To find whether a number is even or odd without using any
conditional operator??
Answer Posted / mukul garg
main()
{
int num;
clrscr();
printf("enter the number");
scanf("%d",&num);
(num%2==0)?printf("even num"):printf("odd num");
}
| Is This Answer Correct ? | 13 Yes | 16 No |
Post New Answer View All Answers
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is the purpose of 'register' keyword in c language?
What are header files? What are their uses?
Write a program to reverse a string.
Why we use stdio h in c?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
Explain how can I make sure that my program is the only one accessing a file?
What is infinite loop?
Differentiate between Macro and ordinary definition.
What the advantages of using Unions?
What are the back slash character constants or escape sequence charactersavailable in c?
Mention four important string handling functions in c languages .
What is difference between union and structure in c?
What is indirection?
What is dynamic variable in c?