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 |
How can I find out how much free space is available on disk?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
How can I delete a file?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is a newline escape sequence?
wt is d full form of c
Can we replace the struct function in tree syntax with a union?
I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?
f(x,y,z) { y = y+1; z = z+x; } main() { int a,b; a = 2 b = 2; f(a+b,a,a); print a; } what is the value of 'a' printed
What are different storage class specifiers in c?
give an example of type casting by a simple c program