what is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
}
Answers were Sorted based on User's Feedback
Answer / poorna
Ans:3 3 1
bcoz
z=4-- -3; z=4-3;
z=1;
and x=3
there fore answer is 3 3 1
| Is This Answer Correct ? | 42 Yes | 5 No |
Answer / ravi chandra
x=4
y=3
z=x-- -y;
x-- means at first the left hand value will be equal to x
i.e., z=x and then the value of x gets decrement..
z=x-- -y
z=4-- -3
z=4-3 and x=x-1
z=1 and x=3
the y value remains same y=3
therefore x=3 y=3 and z=1
| Is This Answer Correct ? | 9 Yes | 0 No |
int i=0,j; j=++i + ++i ++i; printf(" %d",j);
Define recursion in c.
my name is nani i completed my b-tech in hyd now i want go for interveiw but i dont know the process of software field interveiws plz help me anyone how many rouds there n what rounds plz plz plz help me n where i can get these details
What is the right way to use errno?
What are control structures? What are the different types?
What compilation do?
7 Answers Geometric Software, Infosys,
What is the right type to use for boolean values in c?
/*what is the output for the code*/ void main() { int r; r=printf("naveen"); r=printf(); printf("%d",r); getch(); }
What does a run-time "null pointer assignment" error mean?
How can I remove the trailing spaces from a string?
What is string constants?
Explain the bubble sort algorithm.