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
What is difference between union and structure in c?
What is ponter?
Do variables need to be initialized?
find the sum of two matrices and WAP for it.
Why static variable is used in c?
What is wrong in this statement? scanf(“%d”,whatnumber);
Is c++ based on c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What are linker error?
What is assignment operator?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
What is variable in c example?
Why is it that not all header files are declared in every C program?
Why can’t constant values be used to define an array’s initial size?
Write a program to print all permutations of a given string.