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


Please Help Members By Posting Answers For Below Questions

Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

2501


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

548


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3329


Why should I use standard library functions instead of writing my own?

665


What is the concatenation operator?

598






What is sorting in c plus plus?

557


How do you print an address?

734


What is the difference between near, far and huge pointers?

622


How can I pad a string to a known length?

603


Can we use visual studio for c?

536


What does c mean in basketball?

552


What is use of integral promotions in c?

654


Under what circumstances does a name clash occur?

682


What is I ++ in c programming?

610


What will be the outcome of the following conditional statement if the value of variable s is 10?

753