0% found this document useful (0 votes)
33 views4 pages

C PROGRAMING PRACTICALS LIST - Final

Uploaded by

amansd349
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views4 pages

C PROGRAMING PRACTICALS LIST - Final

Uploaded by

amansd349
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Bhagwan Parshuram Institute of Technology

Department of Computer Science & Engineering

Subject Name: PROGRAMMING IN ‘C’


Subject Code: ES-101
Semester: I

PRACTICAL LIST
Q.1
1A. History and Evolution of C
1B. Applications of C
1C. Limitations of C

Q2.
2A. INSTALLATION OF CODE BLOCKS
2B. Introduction to programming cycle
2C. Specific functions of Compiler, Linker, Loader
2D. Differentiate between Assembly language, Machine language and High level language
2E. Write the ‘C’ program -PRINT YOUR NAME

Q3. Write the algorithm, flowchart and C program of the following


3A. Addition of Two Numbers
3B. Find the Area & Perimeter of a Rectangle
3C. Find the Volume of a Cone
3D. Temperature Conversion
3E. Find the Sum & Average oF n-Natural Numbers (using FORMULA)
3F. The total number of students in a class are 45 out of which 25 are boys. If 80% of the total
students secured grade 'A' out of which 17 are boys, then write a program to calculate the total
number of girls getting grade 'A'.

Q.4
4.A Explain the C99 extensions: ‘C’ Standard Libraries: stdio.h, stdlib.h, assert.h, math.h, time.h,
ctype.h, setjmp.h, string.h, stdarg.h, unistd.h
4.B Write a C program to find the square root of a number (use math.h).
4.C Write a C program to find factorial of a number using tgamma() Method.

Q.5
5A. Write a program to calculate the sum of the first and the second last digit of a 5 digit number
entered from the keyboard.
5B. Write a program to calculate the sum of the digits of a 3-digit number which is entered from
keyboard.
5C. Write a program to reverse a 3-digit number which is entered from keyboard.
5D. Subtract Two Number Without Using Subtraction Operator.
5E. Write a C program to check whether the number is EVEN or ODD, without using any
arithmetic or relational operators
5F. Write a C program to check if two numbers are EQUAL or not without using arithmetic
operators or comparison operators.
5G. Write a C program to find the largest of three numbers using ternary operator

Q6. Write the algorithm, flowchart, and C program of the following [IF STATEMENT]
6A. Calculate the roots of a quadratic equation.
6B. Implement currency converter
6C. To check if a given number is an Armstrong number or not
Hint: (A number is called an Armstrong number if the sum of the cubes of the digits of the
number is equal to the number. For example, 153 = 1^3 + 5^3 + 3^3.)

Q7.
A. Write a C program that reads a positive integer n and then prints the following pattern
____*****
_____****
______***
_______**
________*
where n is the number of lines

B. *
**
***
****
……input n the number of lines

C. Print the Triangle


….*....
…***...
..*****..
.*******.
*********

Q.8

8.A Write a program in C to store the elements in an array and print them.
8.B WAP to read 'n' number of values in array and display them in reverse order.
8.C WAP in C to copy the elements of one array into another array.
8.D WAP in C to merge two arrays of same size sorted in descending order.
8.E WAP in C to seperate odd and even integers into seperate arrays.
Q.9
9.A What are Macros? Discuss with a working example. Also state the types of Macros.
9.B. Differentiate between local and global variables. Explain the scope of local and global
variables with the help of an example.
9.C Discuss various storage classes in C.

Q.10
10.A Define function definition, declaration, function call and function stack.
10.B WAP in C to swap two numbers using functions – call by value and call by reference
10.C Write a program to find all prime numbers from 1-100
10.D WAP to factorial of a number using functions.
10.E WAP to generate Fibonacci series

Q. 11
11.A How do we compare two strings? Explain with the help of an example.
11.B WAP in C to reverse a string.
11.C WAP to check palindrome.
11.D What is lexicographical ordering? Is it connected with comparing two strings? Justify

Q.12
12.A What is pointer to a pointer. Explain its usage with the help of an example.
12.B What is void*. How it is used and managed in C. Explain with example.
12.C What is a function pointer? Explain in detail with a help of an example.

Q. 13
13.A Discuss in detail Structures in C, enumeration and union with the help of examples
13.B What are command line arguments.

Q14. Write a menu driven program to perform various operations on 2D matrices


a. Addition of 2 matrices
b. Subtraction of 2 matrices
c. Multiplication of 2 matrices
d. Lower triangular matrix

Q.15 Write a program to perform linear search, binary search and bubble sort.

Q.16 Explain in detail file handling in C – file modes, basic file operations : read, write and
append, scope and life of variables.

Q.17 Explain multi-file programming.


Advanced Concepts:
Do any three from the given below experiments.

Q.18 Write a C program to count bits set in an integer?


Q.19 How to reverse the bits in an integer?
Q.20 What do Segmentation fault, access violation, core dump and Bus error mean?
Q.21 What is the difference between an array of pointers and a pointer to an array?
Q.22 What are brk() and sbrk() used for? How are they different from malloc()?
Q.23 Is *(*(p+i)+j) is equivalent to p[i][j]? Is num[i] == i[num] == *(num + i) == *(i + num)?
Q.24 What is an opaque pointer?
Q.25 Can we declare a function that can return a pointer to a function of the same type?
Q.26 How can we find out the length of an array dynamically in C?

You might also like