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 is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


What is the difference between declaring a variable and defining a variable?

0 Answers  


What is the difference between far and near ?

0 Answers  


why array index always starts from zero??

4 Answers   TCS,


Tell us two differences between new () and malloc ()?

0 Answers   Adobe,






What is a function simple definition?

0 Answers  


When is an interface "good"?

1 Answers  


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

0 Answers   KPIT,


Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()

2 Answers   Accenture, TCS,


what is const volatile?

2 Answers  


What is the maximum length of an identifier?

0 Answers  


Why is c called a structured programming language?

0 Answers  


Categories