main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / ssssssssss
output
2
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What is the advantage of an array over individual variables?
How can you find the day of the week given the date?
Write the syntax and purpose of a switch statement in C.
How many types of functions are there in c?
Can we use any name in place of argv and argc as command line arguments?
What are keywords in c with examples?
What is the process to generate random numbers in c programming language?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is build process in c?
How do you print only part of a string?
Can you please compare array with pointer?
What is function pointer c?
Do you know the use of fflush() function?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]