get any number as input except 1 and the output will be
1.without using operators,expressions,array,structure.don't
print 1 in printf statement

Answers were Sorted based on User's Feedback



get any number as input except 1 and the output will be 1.without using operators,expressions,array..

Answer / bheemakarna1989

example
input : 4554
output : 1



input :567
output : 1

Is This Answer Correct ?    4 Yes 0 No

get any number as input except 1 and the output will be 1.without using operators,expressions,array..

Answer / karna

void main()
{
int n;
printf("%d",scanf("%d",n));
getch();
}

Is This Answer Correct ?    2 Yes 1 No

get any number as input except 1 and the output will be 1.without using operators,expressions,array..

Answer / amarnathreddy

i am going to write only logic
n=1000
n1=n-(n-1)
1000-999=1

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More C Interview Questions

How do we print only part of a string in c?

0 Answers  


What is mean by data types in c?

0 Answers  


main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }

4 Answers   Vector,


Main must be written as a.the first function in the program b.Second function in the program c.Last function in the program d.any where in the program

19 Answers   CTS, HCL, TCS,


In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }

1 Answers  


read a number & print all its devisors using c-program?

3 Answers  


wat s the meaning of (int *)p +4;

2 Answers  


Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.

6 Answers   Wipro,


Is file a keyword in c?

0 Answers  


Is that possible to add pointers to each other?

0 Answers  


Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


#include<stdio.h> int main( ) { Int a=300, b, c; if(a>=400) b=300; c=200; printf(“%d%d ”, b, c); return0; }

1 Answers  


Categories