Subscribe

Enter your email address:

Categories

 

September 2010
M T W T F S S
« Dec    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives

Disclaimer

© 2009 Zero Intellect. All rights reserved. The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. This material is not sponsored or endorsed by any of the vendors mentioned in this website and their Logos are trademarks of their own and their affiliates.

Overview of a structure in C and C++

 

The following article gives a brief overview of the structure in C/C++. The structure was first introduced in C where the need to group variables into a single record arose. Variables normally were assigned a single value or were assigned multiple values of the same type (array). The introduction of the structure allowed for variables to

Continue reading Overview of a structure in C and C++

C++ printing out a specific pattern

 

Sometimes we come across elementary C++ programming tasks but which require you to tax your brain because of the logic involved

 

I came across a question which asked the user to write a c++ program to print the pattern above for any value of N (where N are the number of rows)

1234554321

1234**4321

123****321

12******21

1********1

 

The solution to the problem can

Continue reading C++ printing out a specific pattern

C++ Logical Negation Operator

 

The logical negation operator ! [exclamation] used in C++ and many other languages. However the return value of the operator is overlooked by many people.

 

The syntax of the operator follows is

 

! cast-expression

 

Where, the cast-expression operand must be of scalar type (returning only a single value, not multiple values like an array)

 

The result is of type int

Continue reading C++ Logical Negation Operator

Exceeding the range of data types in C++

 

My friend recently gave his C++ oral examination and one of the questions asked by the invigilators was regarding incrementing a variable after it has been set to the maximum value in its range

To be specific, in his case the invigilator asked him the output of a variable of type int if initialized to 32765 and

Continue reading Exceeding the range of data types in C++