write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / avinash kumar
#include<stdio.h>
main()
{
int a;
clrscr();
printf("enter a number:");
scanf("%d",&a);
if(a%2=0)
printf("even");
else
printf("odd")
getch();
}
| Is This Answer Correct ? | 25 Yes | 22 No |
Post New Answer View All Answers
What is anagram in c?
Define and explain about ! Operator?
Why isn't any of this standardized in c? Any real program has to do some of these things.
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
What is a structure in c language. how to initialise a structure in c?
What is line in c preprocessor?
Describe static function with its usage?
How many types of sorting are there in c?
Why can’t constant values be used to define an array’s initial size?
Which header file is essential for using strcmp function?
What are the types of operators in c?
Explain can you assign a different address to an array tag?
Why is it important to memset a variable, immediately after allocating memory to it ?
How do you redirect a standard stream?
What are qualifiers in c?