write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m;
printf("0 - odd number \t 1 - even number\n");
printf("enter the number :");
scanf("%d",&m);
printf(" %d ",m&1);
getch();
}
thank u
| Is This Answer Correct ? | 43 Yes | 27 No |
Post New Answer View All Answers
What is sizeof in c?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
Why we not create function inside function.
What is the time and space complexities of merge sort and when is it preferred over quick sort?
Who is the main contributor in designing the c language after dennis ritchie?
Describe the modifier in c?
What is the difference between constant pointer and constant variable?
p*=(++q)++*--p when p=q=1 while(q<=6)
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
Why c is a mother language?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
What is the difference between declaring a variable and defining a variable?
What is the difference between strcpy() and memcpy() function in c programming?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What is clrscr in c?