To find whether a number is even or odd without using any
conditional operator??
Answer Posted / sahithya
void main()
{
int n;
printf("enter n:");
scanf("%d",&n);
if(n%2==0)
printf( "even");
else
printf("odd");
}
Is This Answer Correct ? | 15 Yes | 34 No |
Post New Answer View All Answers
What is double pointer in c?
What is data structure in c and its types?
List the difference between a "copy constructor" and a "assignment operator"?
How to define structures? ·
What are categories used for in c?
What do you mean by a sequential access file?
What is the importance of c in your views?
what are bit fields? What is the use of bit fields in a structure declaration?
What is the difference between int main and void main in c?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
Can you please explain the difference between malloc() and calloc() function?
how could explain about job profile
What is union and structure?
What are the features of c languages?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?