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
Which is better malloc or calloc?
What is .obj file in c?
What is pointer and structure in c?
What is return in c programming?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Explain the difference between the local variable and global variable in c?
What is "Duff's Device"?
What are the c keywords?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Can we increase size of array in c?
how can f be used for both float and double arguments in printf? Are not they different types?
How are Structure passing and returning implemented by the complier?
Explain about block scope in c?