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 |
What is wrong with this declaration?
What is a class?
what is difference between overriding and overloading?
#include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); } what is the output for this?
What is sizeof array in c?
Subtract Two Number Without Using Subtraction Operator
please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }
How can you access memory located at a certain address?
What is a 'null pointer assignment' error?
what is the use of operator ^ in C ? and how it works?
Will Macros support multiple arguments ?
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }