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 is a file descriptor in c?
consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none
Is a pointer a kind of array?
What are the different types of pointers?
Is array name a pointer?
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
Is it possible to create recycle bin in mobiles?
What is the difference between static and global variables?
A array contains dissimilar element how can we count, and A array contains dissimilar element how can we store in another array with out repetition.
What is the heap in c?
I want tcs placement papers of 2004-2009 , its urgent
What is the purpose of macro in C language?