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 stack in c?
What are the general description for loop statement and available loop types in c?
Can a pointer point to null?
What is the use of bit field?
how to introdu5ce my self in serco
What is c basic?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What is void pointers in c?
Explain what is a program flowchart and explain how does it help in writing a program?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
Explain the use of #pragma exit?
What is the deal on sprintf_s return value?
How do you define a string?
Why can’t we compare structures?