How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)
Answer Posted / anandi
void main()
{
int n;
char s[20][20]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
how is the examination pattern?
Compare and contrast compilers from interpreters.
What is realloc in c?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
How do you list files in a directory?
differentiate built-in functions and user – defined functions.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is 1d array in c?
Explain the difference between exit() and _exit() function?
using for loop sum 2 number of any 4 digit number in c language
Explain main function in c?
What is a constant and types of constants in c?
how many errors in c explain deply