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

WAP – represent a char in binary format

4 Answers   Motorola, Wipro,


How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


Difference between Shallow copy and Deep copy?

0 Answers  


What is the use of ?

0 Answers  


Is c procedural or functional?

0 Answers  






pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used.

4 Answers   Persistent, Valyoo,


Where local variables are stored in c?

0 Answers  


Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates

3 Answers  


Are there constructors in c?

0 Answers  


Explain what are multidimensional arrays?

0 Answers  


YBJBU6

1 Answers  


Do array subscripts always start with zero?

0 Answers  


Categories