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


Explain one-definition rule (ODR). According to one-definition rule, C++ constructs should be identically defined in each compilation unit they are used in. As per ODR, two

Make the following 3 functions work by filling in appropriate C code. This file 1. // Write a function to count the number of particular characters in a string. // Do not use a

Write a program to add co-ordinates of the plane The class having x and y co-ordinates. Create three objects. Use a constructor to pass one pair of co-ordinates and a funct

Classes and Objects A class is a vehicle to execute the OOP features in the C++ language. Once a class is declared, an object of that type can be explained. An object is said t

Problem 1. Explain Break and continue statements in C++. Explanation of Break statement Explanation of Continue statement 2. Explain concepts of constructors and

Question 1 Describe the theory behind class templates and function templates along with relevant programming examples Question 2 With the help of suitable programming example


Rule: To determine the canonical form we should OR the min terms. A min term is defined as a Boolean equation of the input if the output is logic '1'. If the input is logic '1'