Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1943


Differentiate between Macro and ordinary definition.

1463


Write a progarm to find the length of string using switch case?

2121


Explain how can you avoid including a header more than once?

1145


which type of aspect you want from the student.

2205


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1958


Explain logical errors? Compare with syntax errors.

1126


What is the use of a static variable in c?

1108


What is an operator?

1124


What are the disadvantages of a shell structure?

1420


Explain the Difference between the New and Malloc keyword.

1186


What type is sizeof?

1084


Is c is a low level language?

1206


What is difference between static and global variable in c?

1103


Is register a keyword in c?

1082