Storage Class and Nested Loop Programming

C – Storage Class and Nested Loop

  • January 2, 2021
  • 0 Comments

‘Storage’ refers to the scope of a variable and memory allocated by the compiler to store that variable. The scope of a variable is the boundary within which a variable can be used. Storage class defines the scope and lifetime of a variable. From the point view of C compiler, a variable name identifies the physical location from […]

Calculate Sum, Div, Mul and Difference using Function Programming

C++ – Calculate Sum, Div, Mul and Difference using Function

  • March 21, 2016
  • 0 Comments

Write a program equivalent to a four-function calculator. The program should request a user to enter a number, an operator, and another number. It should then carry out the specified arithmetical operation: adding, subtracting, dividing, or multiplying two numbers (Use the concept of function add(), sub(),…). C++ Functions to Add, Subtract, Multiply and Divide Using […]

Input Marks and Find Grade and CGPA Programming

C++ Program to Input Marks and Find Grade and CGPA

  • March 20, 2016
  • 0 Comments

A class has four papers in one term. Write a program that will read a student’s score in four papers as an integer and output the student’s average and grade according to the following table. Average marks >= 80 are A Average marks >= 60 are B Average marks >= 50 are C Average marks […]

Generates Triangle Shape Nested Loop Programming

C++ – Generates Triangle Shape Nested Loop

  • March 18, 2016
  • 0 Comments

Write a program that generates the following output using a break statement with nested any loop. C++ Program to Input Marks and Find Grade and CGPA C++ – Calculate Factorial using For, While, Do While C++ – Calculate Sum, Div, Mul and Difference using Function 1 4 6      9 8      12   16 10           … 12           […]

Input Character and Display Vowel or Not Programming

C++ – Input Character and Display Vowel or Not

  • March 16, 2016
  • 0 Comments

Write a program that prints the ASCII code of the input character (both upper case and lower case) and displays whether the character is a vowel or not. e.g. if ‘A’ is inputted then the output should be 65 and should display ‘vowel’. C++ Program to Implement Unary Operator Overloading C++ Program to Convert Degree […]