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
Explain what is the difference between far and near ?
how to find binary of number?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What is FIFO?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
Differentiate between the expression “++a” and “a++”?
How do you sort filenames in a directory?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
please give me some tips for the placement in the TCS.
What do you mean by recursion in c?
What is the difference between NULL and NUL?
What do you mean by c?
Describe how arrays can be passed to a user defined function
What language is lisp written in?
What is variable initialization and why is it important?