Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What are the different flags in C? And how they are useful? And give example for each in different consequences?

1 Answers  


program for validity of triangle from 3 side

7 Answers  


What is a structural principle?

0 Answers  


2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value

3 Answers   Accenture,


What are pointers in C? Give an example where to illustrate their significance.

0 Answers   Wipro,


What is %d called in c?

0 Answers  


What is a substring in c?

0 Answers  


Write a C program to print 1 2 3 ... 100 without using loops?

15 Answers   Hindalco,


main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }

10 Answers   TCS, Vector,


Write a small C program to determine whether a machine's type is little-endian or big-endian.

5 Answers   nvidia,


write a program to display the frequency of each element in a given array in c language

1 Answers  


Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?

1 Answers   Oracle,


Categories