GCC
X
CSD
CSC-C-101-L
Programming Fundamentals Using C/C++
Q-01
Write a C/C++ program to reverse a given number.
See Code →
Q-02
Write a C/C++ program to print the sum and product of digits of an integer.
See Code →
Q-03
Write a C/C++ to compute the sum of the first n terms of the following series.
S = 1 +
1
/
2
+
1
/
3
+
1
/
4
+ . . . + n
See Code →
Q-04
Write a C/C++ program to compute the sum of the first n terms of the series.
S = 1 - 2 + 3 - 4 + 5 . . . n
See Code →
Q-05
Write a function that checks whether a given string is palindrome or not.
See Code →
Q-06
Write a function to find whether a given number is prime or not. Use the same function to generate all the prime numbers less than 100.
See Code →
Q-07
Write a C/C++ program to display Fibanocci Series:
(i) Using Recursion
(ii) Using Iteration
See Code →
Q-08
Write a C/C++ program to calculate GCD of two numbers:
(i) Using Recursion
(ii) Using Iteration
See Code →
Q-09
Write a C/C++ program to calculate Factorial of a given number:
(i) Using Recursion
(ii) Using Iteration
See Code →
Q-10
Write a C/C++ program to print a triangle of asterisks(*) as follows (take number of lines from user as input):
*
* * *
* * * * *
* * * * * * *
See Code →
Q-11
Write a C/C++ program to compute the factors of a given number.
See Code →
Q-12
Write a C/C++ program that swaps two numbers using pointers.
See Code →
Q-13
Write a C++ program that create a class and to perform swapping of two numbers without using third (temporary) variable.
See Code →
Q-14
Write a C++ program to create a structure Student containing fields for roll number, name, class, year and total marks. Create 5 students and display their records.
See Code →
Q-15
Write a C/C++ program that performs read and write operations in a file.
See Code →
Q-16
Write a C/C++ program that swaps two numbers using:
(i) Call by value
(ii) Call by reference.
See Code →
Q-17
Write a C/C++ prgram to check whether the given number is Armstrong number or not.
See Code →
Q-18
Write a C/C++ program to find the sum of two matrices.
See Code →
Q-19
Write a C/C++ program to find the difference of two matrices.
See Code →
Q-20
Write a C/C++ program to find the product of two matrices.
See Code →
Q-21
Write a C/C++ program to find the transpose of a matrix.
See Code →
Q-22
Write a C/C++ program to find the length of a given string.
See Code →
Q-23
Write a C/C++ program to concatenate two given strings.
See Code →
Q-24
Write a C/C++ program to compare two given strings.
See Code →
Q-25
Write a C/C++ program to convert all characters of given string to uppercase.
See Code →
Q-26
Write a C/C++ program to count the number of vowels, semi-vowels and consonants in a given string.
See Code →
Q-27
Write a C/C++ program to reverse a given string.
See Code →
Q-28
Write a C/C++ program to convert a given decimal number to its equivalent binary number.
See Code →
Q-29
Write a C/C++ program to convert a given binary number/string to its equivalent decimal number.
See Code →
Q-30
Write a C/C++ program to reverse a given array.
See Code →
Q-31
Write a C/C++ program to find the maximum and minimum value in a given array.
See Code →
Q-32
Write a C/C++ program to find the position of given element in an array.
See Code →
Q-33
Write a C/C++ program to find the position of all the occurrences of the given element in an array.
See Code →
Q-34
Write a C++ program to demonstrate the concept of passing object as an arguments and returning object from that function.
See Code →
Q-35
Write a menu driven C/C++ program using switch-case statement that acts as a basic calculator.
See Code →
Q-36
Write a C++ program to demonstrate the concept of function overloading.
(Compile time Polymorphism)
See Code →
Q-37
Write a C++ program to demonstrate the concept of operator overloading.
(Compile time Polymorphism)
See Code →
Q-38
Write a C++ program to demonstrate the concept of multi-level inheritance.
See Code →
Q-39
Write a C++ program to demonstrate the concept of multiple inheritance.
See Code →
Q-40
Write a C++ program to demonstrate the concept of hierarchical inheritance.
See Code →
Q-41
Write a C++ program to demonstrate the concept of hybrid inheritance.
See Code →
Q-42
Write a C++ program to demonstrate the use of virtual function.
(Runtime time Polymorphism)
See Code →