find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / abhradeep chatterjee
ya. the first answer has impressed me.
#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 ? | 5 Yes | 1 No |
Post New Answer View All Answers
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
How was c created?
Explain a file operation in C with an example.
What is modifier & how many types of modifiers available in c?
What are the types of assignment statements?
What is restrict keyword in c?
Explain can static variables be declared in a header file?
What is the use of gets and puts?
Which programming language is best for getting job 2020?
Explain what is the heap?
What is string function c?
Explain the term printf() and scanf() used in c language?
Differentiate between declaring a variable and defining a variable?
What type of function is main ()?
Do you know the purpose of 'register' keyword?