input may any number except 1,output will always 1..
conditions only one variable should be declare,don't use
operators,expressions,array,structure

Answers were Sorted based on User's Feedback



input may any number except 1,output will always 1.. conditions only one variable should be declare..

Answer / kesavalu

#include<stdio.h>
#include<conio.h>
main()
{
int d;
printf("enter any no except 1");
scanf("%d",&d);
clrscr();
printf("1");
getch();
}

Is This Answer Correct ?    9 Yes 2 No

input may any number except 1,output will always 1.. conditions only one variable should be declare..

Answer / nila

#include<stdio.h>
#include<conio.h>
main()
{
int a;
printf("Enter the number:");
scanf("%d",&a);
printf("1");
getch();
}

Is This Answer Correct ?    3 Yes 1 No

input may any number except 1,output will always 1.. conditions only one variable should be declare..

Answer / santhosh r

#include<stdio.h>
main()

{int a;
printf("%d",scanf("%d",&a));
}

Is This Answer Correct ?    9 Yes 8 No

input may any number except 1,output will always 1.. conditions only one variable should be declare..

Answer / dana

#include<stdio.h>
#include<conio.h>
main()
{
int x;
printf{"enter the num ",x);
scanf("%d",&x);
if(x!=1)
printf("1");
else
printf(" ");
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

ABCDCBA ABC CBA AB BA A A

4 Answers   TCS,


write a c program to accept a given integer value and print its value in words

4 Answers   Vernalis, Vernalis Systems,


1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output

2 Answers  


What do you mean by keywords in c?

0 Answers  


Can we replace the struct function in tree syntax with a union?

0 Answers   Huawei,






Explain the use of #pragma exit?

0 Answers  


what is the use of fflush() function?

2 Answers  


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

0 Answers   Infosys,


WHAT IS INT?

8 Answers   Accenture,


main() { char p[] = "hello world!"; p = "vector"; printf("%s",p); }

2 Answers   Vector, Vector India,


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

0 Answers  


What is a protocol in c?

0 Answers  


Categories