main() {
int x=2, y=4
if ((x==2||y==4)
x++
y++
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
What is the output?
Answers were Sorted based on User's Feedback
Answer / rajesh
Error will be occur because the variable declaration
does`t intilized terminate symbol(;), and again same
mistake in line 5 and line 6.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / ganesh bankar
There is a errsor at compile time because some statements
are not terminated by ";".
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / moolshankershukla
if use terminator after x++ and y++ and y=4 and ) missing
and {} missing then out put is
x=8 and y=6.
correct answer like this :
main ()
{
int x=2, y=4;
if ((x==2||y==4))
{
x++;
y++;
}
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
out put is
x=8 and y=6.
| Is This Answer Correct ? | 5 Yes | 0 No |
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Define Array of pointers.
differentiate built-in functions and user – defined functions.
How to implement a packet in C
which of the function operator cannot be over loaded a) <= b)?: c)== d)*
10 Answers Cisco, CTS, Google, HCL, HP,
what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer
What is sizeof c?
What is sorting in c plus plus?
what are advantages of U D F?