what is the output of following question?
void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}
Answer Posted / vignesh1988i
my opinion or wat i think is that ,
a[i]=i++; is given so...
here i++ is a post increment operation , so first it will assign the value to a[0]=0 , so a[0] will have 0 , and in next line a[i] is given in printf , so the value a[1] should get printed that will be garbage value.......
thank u
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Where in memory are my variables stored?
What is s in c?
Is it better to bitshift a value than to multiply by 2?
Tell us two differences between new () and malloc ()?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is structure in c explain with example?
How many header files are in c?
Is a house a shell structure?
What is the purpose of type declarations?
Write a program to find the biggest number of three numbers in c?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
Who is the main contributor in designing the c language after dennis ritchie?
What does int main () mean?
What is the size of enum in c?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.