find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / shashi
#include<stdio.h>
main()
{
int n;
string s[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",s[n]);
}
Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
How can I determine whether a machines byte order is big-endian or little-endian?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
What is the role of this pointer?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
How can I get back to the interactive keyboard if stdin is redirected?
What is a keyword?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is wrong with this statement? Myname = 'robin';
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
The file stdio.h, what does it contain?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is main () in c language?
Explain the priority queues?
What do you mean by invalid pointer arithmetic?
What is C language ?