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


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between far and near ?

655


how to find binary of number?

3447


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

1646


What is FIFO?

678


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?

1921






Differentiate between the expression “++a” and “a++”?

709


How do you sort filenames in a directory?

717


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)

1635


please give me some tips for the placement in the TCS.

1637


What do you mean by recursion in c?

630


What is the difference between NULL and NUL?

733


What do you mean by c?

592


Describe how arrays can be passed to a user defined function

788


What language is lisp written in?

622


What is variable initialization and why is it important?

623