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 the difference between the local variable and global variable in c?
Where register variables are stored in c?
What is d'n in c?
Explain how can you tell whether two strings are the same?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Explain what is the benefit of using #define to declare a constant?
Can stdout be forced to print somewhere other than the screen?
How to write c functions that modify head pointer of a linked list?
Write a program to print "hello world" without using a semicolon?
What is spaghetti programming?
What are different types of variables in c?
What is the use of void pointer and null pointer in c language?
What is printf () in c?
What is dynamic variable in c?
What is a pointer value and address in c?