write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / dr:rahul
#include<stdio.h>
#include<conio.h>
void main()
{
int rahul;
printf("0 - odd number \t 1 - even number\n");
printf("enter the number :");
scanf("%d",&rahul);
printf(" %d ",rahul&1);
getch();
}
| Is This Answer Correct ? | 4 Yes | 14 No |
Post New Answer View All Answers
Differentiate between Macro and ordinary definition.
Why we use void main in c?
What is local and global variable in c?
Can you explain the four storage classes in C?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
Is c high or low level?
How does placing some code lines between the comment symbol help in debugging the code?
What is the mean of function?
What is context in c?
Why is extern used in c?
What is c programing language?
What is string in c language?
What is #include conio h?
What is function and its example?
What is wrong with this program statement?