what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}
Answer Posted / sha
Vignesh, you are right about the post incerement operation.
The a[i]=a[0] which will be assigned 0 but the printf will
print 0 as output because its printing the a[0] and not a
[1].
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Which is better pointer or array?
What are the two types of structure?
What is the purpose of void pointer?
What are the restrictions of a modulus operator?
How can I read and write comma-delimited text?
What is return in c programming?
What are loops c?
please explain every phase in the "SDLC" in the dotnet.
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 static memory allocation? Explain
What are logical errors and how does it differ from syntax errors?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above