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 |
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x);
void main() { int i=5; printf("%d",i+++++i); }
What is meant by type casting?
Write a program to print ASCII code for a given digit.
Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********
What are all different types of pointers in c?
Explain how can I make sure that my program is the only one accessing a file?
WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE GIVEN VALUES
Write a c program using for loop to print typical pattern if number of rows is entered by keyboard. ABCBA AB BA A A
Differentiate between a structure and a union.
Given an unsigned integer, find if the number is power of 2?
Explain what is the concatenation operator?