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...

find a number whether it is even or odd without using any
control structures and relational operators?

Answer Posted / vishal jain

#include<stdio.h>
#include<conio.h>
int main()
{
int num;
printf("Enter any Number : \n");
scanf("%d",&num);
char *s[2]={"Even","Odd"};
printf("%s",s[num&1]);
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1095


Process by which one bit pattern in to another by bit wise operation is?

1156


What is void main () in c?

1205


Can you add pointers together? Why would you?

1124


What is structure data type in c?

1014


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1876


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1106


What are reserved words with a programming language?

1132


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

2471


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1857


What is c language in simple words?

1068


how is the examination pattern?

2017


Write a code to generate a series where the next element is the sum of last k terms.

1223


Why do we use pointer to pointer in c?

1082


What is the use of f in c?

976