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
Explain b+ tree?
Can include files be nested?
Explain about the functions strcat() and strcmp()?
How do you initialize pointer variables?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
What is a dynamic array in c?
What are structure types in C?
Explain what is output redirection?
What is the difference between break and continue?
Can a variable be both constant and volatile?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
What is the difference between pure virtual function and virtual function?
Is c is a low level language?
What is masking?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }