Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a programme to find even numbers without using any
conditional statement?

Answers were Sorted based on User's Feedback



Write a programme to find even numbers without using any conditional statement?..

Answer / mathiyazhagan

#include<stdio.h>
main()
{
char res[2][5]={"Even","Odd"};
int n;
printf("Enter a number :");
scanf("%d",&n);
printf("the given no is = %s",res[n%2]);
}

Is This Answer Correct ?    51 Yes 7 No

Write a programme to find even numbers without using any conditional statement?..

Answer / 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

Write a programme to find even numbers without using any conditional statement?..

Answer / guest

#nclude<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter the numbers for a,b,c:");
scanf("%d%d",&a,&b);
c=a/b;
c=0;
printf("The given number is even");
getch();
}

Is This Answer Correct ?    6 Yes 57 No

Post New Answer

More C Interview Questions

why wipro wase

0 Answers   Wipro,


Why do we use int main?

0 Answers  


What is scope and lifetime of a variable in c?

0 Answers  


Can anyone tell what is stack overflow? what precaution we should take?

1 Answers  


Write a c program to build a heap method using Pointer to function and pointer to structure ?

0 Answers   Wipro,


What is the difference between fread and fwrite function?

0 Answers  


What are the uses of pre-processor directives?

2 Answers  


What is the output of the below program and how it is? void main() { static int var=5; printf("%d",var--); if(var) main(); }

8 Answers   MindFire, TCS, Tech Mahindra,


How can you determine the maximum value that a numeric variable can hold?

0 Answers  


what are the facialities provided by you after the selection of the student.

0 Answers   TCS,


string reverse using recursion

0 Answers   Mind Tree,


write a programe returns the number of times the character appears in the string

2 Answers  


Categories