Write a program to find given number is even or odd without
using any control statement.
Answer Posted / saneemask
main()
{
{
char a[][5]= {"Even","Odd"};
int n;
printf("Enter any no.: ");
scanf("%d",&n);
printf("%s",a[n%2]);
getch();
}
{
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Can you please compare array with pointer?
What are the advantages of the functions?
What is a global variable in c?
What are the disadvantages of c language?
What is bash c?
Is it better to use a macro or a function?
Explain the array representation of a binary tree in C.
What are multibyte characters?
What is function in c with example?
What is wrong with this code?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is the difference between declaring a variable and defining a variable?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What are different storage class specifiers in c?
Why pointers are used in c?