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 |
Is c programming hard?
If null and 0 are equivalent as null pointer constants, which should I use?
How can you avoid including a header more than once?
WHAT IS LOW LEVEL LANGUAGE?
Write a progarm to find the length of string using switch case?
Do you know what is the purpose of 'extern' keyword in a function declaration?
How can you find the exact size of a data type in c?
how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"
What is call by reference in functions?
1)what are limitations for recursive function? 2)write a program to read a text file and count the number of characters in the text file
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }