C++ Programming Code Examples
C++ > Beginners Lab Assignments Code Examples
Encapsulation is a process of combining data members and functions in a single unit called class.
C Code Find Armstrong Numbers in Range -
Logic to find all Armstrong number between 1 to n. Input Upper Limit to print Armstrong number from user. Store it in some variable say end. Run a loop from 1 to end, increment
Simple Program for Inline Functions Using -
An "Inline Function" is a function upon which the compiler has been requested to perform inline expansion. programmer has requested that the compiler insert the complete body of
C Program Check If a String is Palindrome -
Check if string is a 'Palindrome' without using the "Built-In function". "Take a string" as input & store it in the array 'string[]'. Then store the same string into the another array 'reverse_s'
Programming Code to Concatenate String -
To concatenate strings in 'C++' Programming, you have to ask to enter the 2 string and start concatenating one string into other using the strcat() function as shown here in the sample
Program Represent Graph Using 2D Array -
Algorithm takes the input of the number of vertex & edges. Take the input of connected vertex pairs. Print the graph using 2D arrays. A function to "print the matrix". Print 1 if the
Code find maximum using ladder if.else.if -
Instead of using Nested If Else. Lets combine 2 or more conditions together using Logical Operators. A number j1 among 3 numbers j1, j2 and j3 is said maximum if j1 > j2 and j1 > j3.
Structure is A Compound Data Type that -
To store Student details like student 'name', student 'roll num', 'student age'. You have 2 ways to do it, one way is to create different variables for each data, but the downfall of
Triangle given the lengths of its sides in C -
C Programming code gives all details of a Triangle given the lengths of its sides. Enter the lengths of the three sides of the triangle. S is the semiperimeter of the triangle. D is...