main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / pragathi
3 is the answer bcoz
i=1
num[i]=i++;
num[1]=2;
here i=2
printf("%d", num[2]);
here 3 is there at position 2 .
so answer is 3
| Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
What is the difference between the expression “++a” and “a++”?
What is the explanation for the dangling pointer in c?
What is meant by 'bit masking'?
What are the similarities between c and c++?
What is the translation phases used in c language?
Why is c called a structured programming language?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What is C language ?
Write a code to generate divisors of an integer?
What does sizeof int return?
What is the use of getch ()?
Is null equal to 0 in sql?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Explain the properties of union.