To find whether a number is even or odd without using any
conditional operator??
Answer Posted / kala
main()
{
int n;
printf("enter the number\n");
scanf("%d",&n);
if(n%2==0){
printf("number is even");}
else{
printf("number is odd");
}
}
or
if(n&1==0)
printf("even number");
else
printf(odd number");
Is This Answer Correct ? | 31 Yes | 38 No |
Post New Answer View All Answers
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
Is a house a shell structure?
What is #error and use of it?
Explain the bubble sort algorithm.
What is the use of clrscr?
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 standard functions are available to manipulate strings?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What does c mean?
How many parameters should a function have?
Why doesnt that code work?
What is your stream meaning?
What is the difference between %d and %i?
Write a program to print fibonacci series using recursion?
Why does everyone say not to use scanf? What should I use instead?