main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answers were Sorted based on User's Feedback
Answer / mortal
num[i] is num[1] and its reassigned as i++ that is 1 thus it
will print 1.
but im not at all sure about this..
Is This Answer Correct ? | 2 Yes | 10 No |
Answer / sathya
num[i]=i+1
num[1]=1+1=2, but num[1] is 1.so there is a error...
Is This Answer Correct ? | 4 Yes | 13 No |
Explain what are global variables and explain how do you declare them?
What are the c keywords?
How can I insert or delete a line (or record) in the middle of a file?
Can stdout be forced to print somewhere other than the screen?
if we take a number as a char then can we manipulate(add, subtract) on this number
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1
what is c?
The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);
1 Answers HCL, Public Service Commission,
what are two kinds of java
What is a structure in c language. how to initialise a structure in c?
Did c have any year 2000 problems?
What are enums in c?