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

Is a house a shell structure?

0 Answers  


How does C++ help with the tradeoff of safety vs. usability?

1 Answers  


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

0 Answers  


why array index always starts from zero??

4 Answers   TCS,


What is putchar() function?

0 Answers  






Ow can I insert or delete a line (or record) in the middle of a file?

0 Answers  


write a c program to calculate the income tax of the employees in an organization where the conditions are given as. (I.T. = 0 if income <100000 I.T = 10% if income _< 200000 it = 20% if income >_ 200000)

7 Answers   Consultancy, DBU, FD, JK Associates, Kobe, Satyam,


How to explain the final year project as a fresher please answer with sample project

0 Answers  


Write a c program to demonstrate character and string constants?

0 Answers  


Without using main fn and semicolon,print remainder for a given number in C language

2 Answers  


What is the difference between new and malloc functions?

0 Answers   InterGraph,


Explain how can I right-justify a string?

0 Answers  


Categories