Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The GNU C Programming Tutorial - Questions 18

Node:Questions 18, Previous:Machine-level operators, Up:Advanced operators



Questions 18

  1. Hidden operators can be used in return statements, for example,
    return (++x);
    

    Would there be any point in writing the following?

    return (x++);
    

  2. What distinguishes a bit string from an ordinary variable? Can any variable be a bit string?
  3. What is the difference between an inclusive OR operation and an exclusive OR operation?
  4. Find out what the decimal values of the following operations are.
    1. 7 & 2
    2. 1 & 1
    3. 15 & 3
    4. 15 & 7
    5. 15 & 7 & 3

    Try to explain the results. (Hint: sketch out the numbers as bit strings.)

  5. Find out what the decimal values of the following operations are.
    1. 1 | 2
    2. 1 | 2 | 3
  6. Find out the decimal values of the following operations.
    1. 1 & (~1)
    2. 23 & (~23)
    3. 2012 & (~2012)
    (Hint: write a short program to work them out.)

 
 
  Published under free license. Design by Interspire