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
What is console in c language?
What are volatile variables in c?
difference between object file and executable file
Can we change the value of constant variable in c?
What is %lu in c?
Tell me what are bitwise shift operators?
Is it better to bitshift a value than to multiply by 2?
Write the syntax and purpose of a switch statement in C.
What is variable declaration and definition in c?
write a proram to reverse the string using switch case?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is extern c used for?
Is main is user defined function?
What is keyword with example?
What is pre-emptive data structure and explain it with example?