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 / ismail

2 is the ans

num[i]=i++
num[1]=2

now num[1] is changed with 2(same as the previous value)
now to print num[i]=num[1] right?
its 2 which is in num[1] solved!!!!

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1969


How do you convert strings to numbers in C?

1219


What does s c mean in text?

1095


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1063


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1204


how logic is used

1966


What is the c value paradox and how is it explained?

1053


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2071


Why is sprintf unsafe?

1073


Explain how do you view the path?

1170


Why c is called a middle level language?

1106


What is a pointer on a pointer in c programming language?

1139


Why do we use int main instead of void main in c?

1144


What was noalias and what ever happened to it?

1039


What is const volatile variable in c?

1035