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
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What are local static variables? How can you use them?
What do you mean by scope of a variable in c?
What does char * * argv mean in c?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
How can I implement a delay, or time a users response, with sub-second resolution?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Is there any demerits of using pointer?
What is the purpose of type declarations?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
What do you mean by c what are the main characteristics of c language?
Is c# a good language?
What's the best way of making my program efficient?
Explain goto?
Why is a semicolon (;) put at the end of every program statement?