write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("0 - odd number \t 1 - even number\n");
printf("enter the number :");
scanf("%d",&m);
printf(" %d ",m&1);
getch();
}
thank u
| Is This Answer Correct ? | 43 Yes | 27 No |
Post New Answer View All Answers
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
Explain #pragma statements.
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is the easiest sorting method to use?
Why do we use & in c?
how should functions be apportioned among source files?
Why #include is used in c language?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
what are enumerations in C
What is operator promotion?
Describe static function with its usage?
How does sizeof know array size?
Write a program to check palindrome number in c programming?
How to write a code for reverse of string without using string functions?
What is the use of void pointer and null pointer in c language?