main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / xyz
the answer will be 3 b'coz whatever the "num[i] = i++;"
this expression the output will be depend's on "i" and
at last i will be 2 and num[2]=3 which is the answer.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What are the two forms of #include directive?
What are the advantages of external class?
Write a program to swap two numbers without using third variable in c?
Why C language is a procedural language?
In C language what is a 'dangling pointer'?
Can we compile a program without main() function?
Differentiate call by value and call by reference?
What is define c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
Apart from dennis ritchie who the other person who contributed in design of c language.
What is a floating point in c?
What is a constant and types of constants in c?
What is a buffer in c?
What is #define used for in c?
provide an example of the Group by clause, when would you use this clause