Write a program to find given number is even or odd without
using any control statement.
Answers were Sorted based on User's Feedback
Answer / rani
#include<stdio.h>
#include<conio.h>
void main()
{
char str[][10]={"even","odd"};
int no;
clrscr();
printf("\nEnter a number...");
scanf("%d",&no);
printf("\n%d is %s",no,str[no%2]);
getch();
}
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / saneemask
main()
{
{
char a[][5]= {"Even","Odd"};
int n;
printf("Enter any no.: ");
scanf("%d",&n);
printf("%s",a[n%2]);
getch();
}
{
| Is This Answer Correct ? | 3 Yes | 0 No |
Explain the process of converting a Tree into a Binary Tree.
list the no of files created when c source file is compiled
what is the difference between NULL & NUL keywords in C?
Is r written in c?
Why do we need a structure?
what are the different storage classes in c?
What is the Difference between Class and Struct?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is a lvalue
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
Here is a good puzzle: how do you write a program which produces its own source code as output?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.