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

trying to fill the array v[i] with post increment of i,
there is no problem;
output is
v[0]=0;
v[1]=1
v[2]=2
v[3]=3
v[4]=4
v[5]=5
v[6]=6
v[7]=7
v[8]=8
v[9]=9

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

`write a program to display the recomended action depends on a color of trafic light using nested if statments

1634


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

638


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1413


Is c++ based on c?

656


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

1634






Does c have enums?

602


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

681


What will be your course of action for a push operation?

669


What is storage class?

655


Explain how are portions of a program disabled in demo versions?

655


What is the function of this pointer?

674


Where does the name "C" come from, anyway?

646


What is the use of printf() and scanf() functions?

636


Can we compile a program without main() function?

636


Where in memory are my variables stored?

637