find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / vamsi
#include<stdio.h>
main()
{
int n;
string p[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",p[n]);
}
| Is This Answer Correct ? | 13 Yes | 8 No |
Post New Answer View All Answers
What is omp_num_threads?
How main function is called in c?
What is calloc()?
What are the types of data structures in c?
What is the difference between near, far and huge pointers?
What is the full form of getch?
C language questions for civil engineering
How is a null pointer different from a dangling pointer?
What is the method to save data in stack data structure type?
how to capitalise first letter of each word in a given string?
Write programs for String Reversal & Palindrome check
Explain union.
the question is that what you have been doing all these periods (one year gap)
write a c program for swapping two strings using pointer
Why c language?