main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / pragathi
3 is the answer bcoz
i=1
num[i]=i++;
num[1]=2;
here i=2
printf("%d", num[2]);
here 3 is there at position 2 .
so answer is 3
| Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
How do you define structure?
Write a program for Overriding.
What is a const pointer in c?
Do you know the use of 'auto' keyword?
What is the purpose of 'register' keyword?
What is .obj file in c?
how to introdu5ce my self in serco
Why pointers are used in c?
Was 2000 a leap year?
write a program in c language to print your bio-data on the screen by using functions.
Without Computer networks, Computers will be half the use. Comment.
string reverse using recursion
define string ?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Tell me about low level programming languages.