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

Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

976


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1205


Can one function call another?

1065


What does the function toupper() do?

1079


Is c language still used?

950


Explain how do you print only part of a string?

1177


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2148


What is exit() function?

978


What is difference between far and near pointers?

1002


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1127


How do I convert a string to all upper or lower case?

1069


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1094


Explain how can I remove the trailing spaces from a string?

1011


What is the benefit of using #define to declare a constant?

1063


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

1097