Write a programme to find even numbers without using any
conditional statement?
Answer Posted / sridhar
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c,d; /*declaring variable using int*/
clrscr();
printf("enter the numbers:")
scanf("/n%d/n%d",&a,&b);/*getting number using scanf*/
c=a,b;
d=(c/2==0);
printf("the even number is:%d",d)/*print the final answer*/
getch();
}
| Is This Answer Correct ? | 8 Yes | 25 No |
Post New Answer View All Answers
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
Write the Program to reverse a string using pointers.
what are non standard function in c
Why do we need a structure?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What are the advantages of union?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
how can use subset in c program and give more example
Is it better to use a macro or a function?
what is the different bitween abap and abap-hr?
Is main is user defined function?
Describe the modifier in c?
what is the basis for selection of arrays or pointers as data structure in a program
What is the use of clrscr?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.