write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / dheerendra
logic
main()
{
int a;
(a%2==0)?printf("even"):printf("odd")
}
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
write a program to generate address labels using structures?
what is reason of your company position's in india no. 1.
Do you know what are the properties of union in c?
What is the explanation for modular programming?
What is the difference between local variable and global variable in c?
How many main () function we can have in a project?
Is c programming hard?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What is a double c?
What is actual argument?
What is the difference between arrays and pointers?
What is use of pointer?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
What is the difference between the local variable and global variable in c?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]