what will be the output of this program?
void main()
{
int a[]={5,10,15};
int i=0,num;
num=a[++i] + ++i +(++i);
printf("%d",num);
}

Answer Posted / abc

initially i=0;
num=a[++i]+ ++i + ++i;
num=a[1]+2+3
num=10+2+3=15

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What header files do I need in order to define the standard library functions I use?

526


When should volatile modifier be used?

539


What standard functions are available to manipulate strings?

552


What does the error message "DGROUP exceeds 64K" mean?

718


What is the benefit of using const for declaring constants?

576






Why do we use & in c?

580


Explain what is the benefit of using an enum rather than a #define constant?

706


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

711


What is calloc() function?

612


Why use int main instead of void main?

580


How can I do graphics in c?

586


What is the explanation for cyclic nature of data types in c?

638


Can a void pointer point to a function?

558


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

2643


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1457