To find whether a number is even or odd without using any
conditional operator??
Answer Posted / sahithya
void main()
{
int n;
printf("enter n:");
scanf("%d",&n);
if(n%2==0)
printf( "even");
else
printf("odd");
}
| Is This Answer Correct ? | 15 Yes | 34 No |
Post New Answer View All Answers
What is a const pointer?
What is nested structure?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What are the types of data structures in c?
What is a sequential access file?
How does free() know explain how much memory to release?
How #define works?
What does *p++ do? What does it point to?
if p is a string contained in a string?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is the difference between #include and #include 'file' ?
How can I recover the file name given an open stream?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA