find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / mohd parvez 09311349697
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a number:");
scanf("%d",&num);
num%2&&printf("Number is ODD")||printf("Number is EVEN");
getch();
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is a function simple definition?
Explain modulus operator.
What is d scanf?
Why we use break in c?
What is pointer in c?
c language interview questions & answer
What is substring in c?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is the use of c language in real life?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
Explain what is #line used for?
What is bin sh c?
Write a code on reverse string and its complexity.
When is a void pointer used?