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
Question: (a) (i) Explain how class members can be accessed when using objects of the class. Use a suitable example to illustrate your answer. (ii) Explain how the privat

(RationalNumber Class) A rational number is a number that can be represented as the quotient of two integers. For example, 1/3, 5/7, 7/2, and so forth are rational numbers (By 2/1

Explain  U s e r - D e f i n e d D a t a T y p es? C has Union and Structure as user-defined data types.  C++ has class which looks like structure with a


i need a detailed c program to explain the parameters of bernoulli''s equation..

Program is to replace every occurrence of in a string: Program is to replace every occurrence of c1 in string with c2 and have function return the no. of replacement int re

Program is to read the characters from keyboard: Program is to read the characters from keyboard one by one stored in different files as upper constants, lower constants, othe

write a c++ program for pebble merchant

Ravi is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with '

Define Enumeration in Computer Programming? Enumerated types enclose a list of constants that are able to be addressed in integer values. We can declare variables and types