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
How many bytes is a struct in c?
Is it better to bitshift a value than to multiply by 2?
Explain what is the difference between functions abs() and fabs()?
How do you view the path?
Can we access the array using a pointer in c language?
What is the scope of static variable in c?
Is the exit() function same as the return statement? Explain.
How to get string length of given string in c?
Explain the Difference between the New and Malloc keyword.
what are the different storage classes in c?
What is the hardest programming language?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Explain how do you determine the length of a string value that was stored in a variable?
write a program to print largest number of each row of a 2D array
What is array of structure in c programming?