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++;
Answers were Sorted based on User's Feedback
Answer / 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 |
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 |
What does the message "automatic aggregate intialization is an ansi feature" mean?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Why c is called procedure oriented language?
what does static variable mean?
what is difference between C and C++
Why does not c have an exponentiation operator?
what is answer for perfect number????????????????
Is that possible to add pointers to each other?
What is c system32 taskhostw exe?
What is difference between constant pointer and constant variable?
can we print any string in c language without using semicolon(;)(terminator) in whole program.