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 |
program to convert a integer to string in c language'
What is the difference between null pointer and wild pointer?
Define C in your own Language.
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
What are local static variables? How can you use them?
main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }
Write a program to find the given number is odd or even without using any loops(if,for,do,while)
What does sizeof function do?
Which is an example of a structural homology?
Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
How can I call fortran?