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
write a c program in such a way that if we enter the today date the output should be next day's date.
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
What is line in c preprocessor?
What are linker error?
What is structure data type in c?
What is the difference between fread and fwrite function?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Combinations of fibanocci prime series
Why do we use c for the speed of light?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What are the different types of objects used in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
What is the difference between void main and main 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.]