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);
}
Answer Posted / 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 |
Post New Answer View All Answers
what do the 'c' and 'v' in argc and argv stand for?
I have seen function declarations that look like this
What type is sizeof?
What are the types of data types and explain?
Why is #define used?
What is data type long in c?
What is the difference between mpi and openmp?
How many types of sorting are there in c?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
What are the different types of control structures in programming?
What is the code in while loop that returns the output of given code?
What are identifiers and keywords in c?
What is the difference between volatile and const volatile?
What is a lvalue
What is p in text message?