How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)
Answer Posted / ligory antony
void main()
{
int n;
char *s[4]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Explain what is dynamic data structure?
explain what is an endless loop?
Can the sizeof operator be used to tell the size of an array passed to a function?
What is a const pointer?
Wt are the Buses in C Language
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 calloc malloc realloc in c?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
What is abstract data structure in c?
How was c created?
In which header file is the null macro defined?
What are the different types of objects used in c?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
#include