main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
}
Answer Posted / ismail
2 is the ans
num[i]=i++
num[1]=2
now num[1] is changed with 2(same as the previous value)
now to print num[i]=num[1] right?
its 2 which is in num[1] solved!!!!
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How we can insert comments in a c program?
Write a program to check whether a number is prime or not using c?
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 are the different data types in C?
Describe the header file and its usage in c programming?
Differentiate between #include<...> and #include '...'
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is the use of header files?
What is a structural principle?
Can we increase size of array in c?
can any one provide me the notes of data structure for ignou cs-62 paper
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
Why is %d used in c?
why do some people write if(0 == x) instead of if(x == 0)?
What are runtime error?