1. What will be the output of the following programs.
a) #include <stdio.h>
Main()
{
Int x=4;
While(x==1)
{
X=x-1;
Printf(“%d”,x);
--x;
}
}

Answers were Sorted based on User's Feedback



1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / mani

it has some error............

Is This Answer Correct ?    6 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / rohit

variable X have not been defined. so it has an error...........

Is This Answer Correct ?    3 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / raja

In the following code snippet
#include <stdio.h>
Main()
{
Int x=4;
While(x==1)
{
X=x-1;
Printf(“%d”,x);
--x;
}
}
everything is fine except the typing mistake. C is a case sensitive language. So if u give Main instead of main u will get a compiler error. So Main, Int, While, Printf should be use as a main, int, while, printf and the X in line 7 should be x.
The correct program is
#include <stdio.h>
main()
{
int x=4;
while(x==1)
{
x=x-1;
printf("%d",x);
--x;
}
}
Nothing will get printed because x != 1

Is This Answer Correct ?    2 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / bhavani

i think x initialization wrong.so it has an error...........

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / satya

Ya.. it is correct...
you initialized the x as Int..
we have to to initialize it as int...

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / palani222samy

empty

Is This Answer Correct ?    0 Yes 0 No

1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x..

Answer / mallesh

output is nothing bcz loop is not exists

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What's the total generic pointer type?

0 Answers  


write a program to find the sum of the array elements in c language?

24 Answers   ICT, Infosys, Wipro,


Can a function argument have default value?

0 Answers   Genpact,


swap 2 numbers without using third variable?

0 Answers   IBS,


write a C program, given number is double without using addt ion and multiplication operator?ex:n=6,ans=12,pls send me ans to goviseenu@gmail.com

6 Answers  






Explain two-dimensional array.

0 Answers  


What is maximum size of array in c?

0 Answers  


who did come first hen or agg

15 Answers   Infosys,


What is pointers in c?

0 Answers  


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

0 Answers  


What are pointers in C? Give an example where to illustrate their significance.

0 Answers   Wipro,


Write a program to print all permutations of a given string.

0 Answers   JPMorgan Chase,


Categories