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
explain what is an endless loop?
How many types of sorting are there in c?
What is return in c programming?
What is a good data structure to use for storing lines of text?
Explain what is the difference between the expression '++a' and 'a++'?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What is infinite loop?
What does volatile do?
Is there any demerits of using pointer?
How to compare array with pointer in c?
What is the purpose of void pointer?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
If you know then define #pragma?
Is it better to bitshift a value than to multiply by 2?