# C++ Programming Code Examples

## C++ > Beginners Lab Assignments Code Examples

### C++ operator is a symbol that is used to perform mathematical or logical manipulations.

C++ Checks if an Undirected Graph is Tree -
C++ Program to check whether an undirected 'graph is tree' or not. Graph is tree if it doesn't contain cycles. A recursive function that uses visited[] & parent to detect cycle in subgraph

Program Shows How a Pointer is Declared -
There are several other things that we can do with "pointers", we have discussed them later in this guide. Now, we just need to know how to link a pointer to the 'Address of a Variable'.

Positional Notation of numbers in C Code -
Enter the number to convert, enter base to which we will convert n, right-hand digit of nprime. Generate digits of converted number right to left. Isolate right-hand digit of n.

Code Illustrate Reading of Data from Files -
Program to illustrates reading of data from a file. Program to opens a file which is present. Once the file opens successfully, it uses libc fgetc() library call to read the content. Code

Check a Given Number is Perfect Number -
This C program code checks whether a given number is perfect number. Perfect number is a number which is equal to sum of its divisor. For eg,divisors of 6 are 1,2 and 3. The sum of

Calling by reference is a little bit the same -
It affects the "value of the variable" from the Parameter List. There is a possibility to use the default values for the parameters in the parameters list. In this case you can assign a

C++ Generate N Number of Passwords of -
C++ Program to generate N passwords each of 'length M'. Problem focuses on finding the N permutations each of length M. Generates random number between 1 and 10. Enter the

Relational Operators in C++ programming -
In C++, This category of the operators is used to compare different values. The result of the operation is a Boolean value. The "Relational" operators are used in the form Operand1 and