find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
main()
{
int n;
char *p[]={"Even","odd"};
clrscr();
printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
getch();
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the size of enum in bytes?
List some of the static data structures in C?
Difference between linking and loading?
What are multidimensional arrays?
hi send me sample aptitude papers of cts?
What is maximum size of array in c?
Explain two-dimensional array.
can we change the default calling convention in c if yes than how.........?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What are header files in c?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
Explain the difference between malloc() and calloc() function?
What are the two forms of #include directive?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What is the difference between variable declaration and variable definition in c?