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
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What is the code for 3 questions and answer check in VisualBasic.Net?
How many levels of pointers can you have?
Write a program to identify if a given binary tree is balanced or not.
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is the explanation for the dangling pointer in c?
How can I direct output to the printer?
Is multithreading possible in c?
What is call by reference in functions?
Can I initialize unions?
How can I find out how much free space is available on disk?
What is the difference between variable declaration and variable definition in c?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
How do I swap bytes?
Are c and c++ the same?