Function that have parameter and makes an integer mask, C/C++ Programming

Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For example, when n = 5 is passed to the function, the function will return 0x20 (Note that 0x20 is 00000000 00000000 00000000 00100000).

Posted Date: 3/29/2013 3:02:32 AM | Location : United States







Related Discussions:- Function that have parameter and makes an integer mask, Assignment Help, Ask Question on Function that have parameter and makes an integer mask, Get Answer, Expert's Help, Function that have parameter and makes an integer mask Discussions

Write discussion on Function that have parameter and makes an integer mask
Your posts are moderated
Related Questions
Write a function to accept a character and display it 40 times.

Program to Open a file in C++: int main() {                  char ch;                  ifstream f1 ("OLDFILE.TXT");                  ofstream f2 ("NEWFILE.TXT");

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Define Four Facilities Provided by C Language Preprocessor? The C language preprocessor provides four separate facilities that you can use as you see fit:   Inclusion

A: Something to let your class to grant access to another class or function. Friends may be either classes or functions. Class grants access privileges to its friends. In genera

Using a Friend Using a friend function is quite easy. The following example explains a friend function to access members of two classes. class Bclass;


Webcam Driver static library or DLL required for Windows I want a .dll or .lib file using which i will take a snapshot from the webcam and it can't turn on the webcam LED while