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

THE LAST two answers posted by two folks are correct but the
declarations have been made wrong...... we cant make use of
1D array here , if so only 'e' or 'o' only will get
printed.... but that is not our aim... so correct
declaration is using a 2D array.....
char a[][6]={{"even"},{"odd"}};

and also it is not the must to make use of array of pointers
concept...........

thank u

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When do we get logical errors?

1068


Explain how do you declare an array that will hold more than 64kb of data?

1396


What are the different types of control structures?

982


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

2624


Write a program to implement queue.

1065


Why is c so popular?

1115


c program for searching a student details among 10 student details

2038


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1187


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1216


What was noalias and what ever happened to it?

974


Why is %d used in c?

956


What are nested functions in c?

974


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1671


Can we assign integer value to char in c?

1153


What are the restrictions of a modulus operator?

1061