How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array)
Answer Posted / ligory antony
void main()
{
int n;
char *s[4]={"even","odd"};
printf("Enter the no.:");
scanf("%d",&n);
n=n%2;
printf("th no. is %s",s[n]);
getch();
}
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
What is nested structure?
Combinations of fibanocci prime series
Which programming language is best for getting job 2020?
in linking some of os executables are linking name some of them
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
How can you increase the size of a dynamically allocated array?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
What is typedef?
What is line in c preprocessor?
Which type of language is c?
a program that can input number of records and can view it again the record
What are the different data types in C?
Explain how do you declare an array that will hold more than 64kb of data?
What are pointers in C? Give an example where to illustrate their significance.
How will you find a duplicate number in a array without negating the nos ?