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...

what is the purpose of the code, and is there any problem
with it.

unsigned int v[10];
unsigned int i = 0;
while (i < 10)
v[i] = i++;

Answer Posted / arka bandyopadhyay

Basically it's a tricky question and the values of v[i] cannot be predicted as there is "i++" which means 'use than change'
that is error associated with the program so using ++i will give us the correct result.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the local variable and global variable in c?

1012


Where register variables are stored in c?

996


What is d'n in c?

1173


Explain how can you tell whether two strings are the same?

1077


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

1222


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

1271


Can stdout be forced to print somewhere other than the screen?

1088


How to write c functions that modify head pointer of a linked list?

1030


Write a program to print "hello world" without using a semicolon?

1116


What is spaghetti programming?

1196


What are different types of variables in c?

1126


What is the use of void pointer and null pointer in c language?

1165


What is printf () in c?

1142


What is dynamic variable in c?

1096


What is a pointer value and address in c?

1179