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
Is a house a shell structure?
What does void main return?
What are the restrictions of a modulus operator?
How is a null pointer different from a dangling pointer?
What are the similarities between c and c++?
What is data structure in c programming?
What is a void pointer? When is a void pointer used?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Explain what are linked list?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
How is a macro different from a function?
What are all different types of pointers in c?
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Is this program statement valid? INT = 10.50;