DashDash
BAN USER- -2of 2 votes
AnswersHow to print a variable 1000 times without using loops and recurssion
- DashDash in India| Report Duplicate | Flag | PURGE
Software Engineer / Developer - 0of 0 votes
AnswersWe have
- DashDash in India for Development
char *p = "abc";
I know we cant do p[0] = 'a'. What is the reason behind it?| Report Duplicate | Flag | PURGE
Software Engineer / Developer C++ - 0of 0 votes
AnswersWhat is the next number in the series
- DashDash in India
2,4,8,16,24...| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Brain Teasers - 0of 0 votes
Answersvoid copystring(char* dest, char *source)
- DashDash
{
while(*source != NULL)
{
*dest = *source;
dest++;
source++;
}
}
int _tmain(int argc, _TCHAR* argv[])
{
char input[10] = "hello";
char *dest;
dest = &input[1];
copystring(dest, input);
return 0;
}
What is the output of the program...| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C++
take 3 pointers low, mid and high
low pointing to 1st element, mid to middle and high to last
if(mid > mid+1 and mid < mid-1) then return mid
else if
mid > high then recursively call with low = mid+1 and high = high
mid < low then recursively call with low = low and high = mid-1
Reverse the string
- DashDash July 06, 2010Find the maximum substring