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
Answer / bheemakarna1989
example
input : 4554
output : 1
input :567
output : 1
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / karna
void main()
{
int n;
printf("%d",scanf("%d",n));
getch();
}
Is This Answer Correct ? | 2 Yes | 1 No |
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 |
Why functions are used in c?
What are structural members?
what would be the output of the following program main() { int a[] = {1,2,3,4,5}; int *ptr = {a,a+1,a+2,a+3,a+4}; printf("%d %d %d %d",a,*ptr,**ptr,ptr); } }
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
what is the difference between definition and declaration? give me some examples.
What is restrict keyword in c?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
How would you rename a function in C?
what is a function method?give example?
who is the father of C Language?
20 Answers CTS, UST,
what is data structure?