Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answers were Sorted based on User's Feedback
Answer / kiran
main()
{
int n;
printf("enter the number");
scanf("%d",&n);
n%2==0?(printf("given number is even");):(printf("given
number is odd"););
| Is This Answer Correct ? | 8 Yes | 3 No |
#include<stdio.h>
int main()
{
int i;
printf("enter a number \n");
scanf("%d",i);
float f=i%2;
f==0 ? printf("given number is even") : printf("given
number is odd");
return 0;
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Explain what is the best way to comment out a section of code that contains comments?
Is r written in c?
How the processor registers can be used in C ?
Are pointers integer?
what is use#in c
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
what is use of loop?
LOGIC OF Bodmas?
There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?
how to use enum datatype?Please explain me?
What are the disadvantages of external storage class?
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?