## C PROGRAMMING LAB

Lab Incharge :  Ms Surinder Kaur

Lab Attendant:  Ms Praveen Batra

Room: C-105

Subjects:          C PROGRAMMING LAB & FUNDAMENTAL OF COMPUTING LAB

A good basic knowledge is a strong foundation for every aspect. Fundamentals of Computing and c programming have been included in the course curriculum to provide the basic knowledge of computers in the initial course module for every trade. It covers a foundational understanding of computer hardware, software, resources, peripherals, Linux and basic of c programming data type, loop, function, arrays etc.

C Programming Lab

1) A) Write a program to produce ASCII equivalent of given number/character and vice versa.

B) Write a program to evaluate the following algebraic expressions after reading necessary values from the user

1.      (ax+b)/ (ax-b)

2.      2.5 log x-cos 30+|x^2-y^2|+ sqrt (2xy)

3.      x^5+10x^4+8x^3+4x+2

2) A) Write a program to print the largest of five numbers (User I/P).

B) Write a program to find factorial of a given number.

3) A) Write a program to print prime numbers between 1 & 100.

B) Write a program to print the following pattern

•        1

2    2

3    3     3

4    4     4     4

4) A) Write a program to print Fibonacci series.

0 1 1 2 3 5 8 13 21….

B) Write a program to find sum of the following series

1 + ½ + 1/3 +……..+1/N

1 + 1/x + 1/x^2 + 1/x^3 + ………+ 1/x^n

5)     Write a menu driven program for matrices to do the following operation Depending on whether the operation requires one or two matrices

• Subtraction of two matrices

• Finding upper and lower triangular matrices

• Transpose of a matrix

• Product of two matrices.

6)    A) Write a recursive program to find factorial of a given number using function.

B) Write a recursive program for tower of Hanoi problem

7)    Write a program to perform the following operators an Strings without using String functions

• To find the Length of String.

• To concatenate two string.

• To find Reverse of a string.

• To Copy one sting to another string.

8)    Write a program to create Students Information System using structure and union.

9)       Write a program that takes two operands and one operator from the user perform the operation and then print the answer.

10)    Write a program with following options:-

(1) Linear search            (2)  Binary search

Suggested Books:

• Yashwant Kanetkar, “Let us C”, BPB Publications, 2nd Edition, 2001.

• Herbert Schildt, “C:The complete reference”, Osbourne Mcgraw Hill, 4th Edition, 2002.

• Raja Raman, “Computer Programming in C”, Prentice Hall of India, 1995.

•  Kernighan & Ritchie, “C Programming Language”, The (Ansi C Version), PHI, 2nd Edition.

FUNDAMENTAL OF COMPUTING LAB

1. Dismantling  PC Part -1

2. Dismantling  PC Part -2

3. Internal and External commands of DOS.

4. System utilities of windows including regedit.

5. Installation of any rpm or debianlinux distribution with emphasis on drive partitioning.

6. Installation of rpm and deb based packages.

7. Understanding of File system of Linux.

8. Creating user and group (through CLI).

9. Understanding and working knowledge of  Libre / Open Office Writer: Editing and Reviewing, Drawing, Tables, Graphs, Templates.

10. Understanding and working knowledge of Libre / Open Office Calc.

11. Two Mini Projects based on the skills learned.

Suggested Books:

• Rajaraman, “Fundamentals of Computers”, Prentice Hall of India, 3rd Edition.

• Mark Middlebrook, “Autocad 2004 for Dummies”, Pustak Mahel Prakashan, 2000.

• Vikas Gupta, “Comdex Computer Course Kit”, Dreamtech Press, 2004.