Computer Programming in C Lab Detailed Syllabus for B.Tech first year first sem is covered here. This gives the details about credits, number of hours and other details along with reference books for the course.

The detailed syllabus for Engineering Computer Programming in C Lab B.Tech 2016-2017 (R16) first year fristsem is as follows.

B.Tech. I Year I Sem. L T/P/D C

Course Code: CS108ES/CS208ES 0 0/3/0 2

**Course Objective:**

- To write programs in C using structured programming approach to solve the problems.

**Course Outcomes**

- Ability to design and test programs to solve mathematical and scientific problems.
- Ability to write structured programs using control structures and functions.
- Recommended Systems/Software Requirements:
- Intel based desktop PC
- GNU C Compiler
- a) Write a C program to find the factorial of a positive integer.

b) Write a C program to find the roots of a quadratic equation. - a) Write a C program to determine if the given number is a prime number or not.

b) A Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0 and 1.Subsequent terms are found by adding the preceding two terms in the sequence. Write a C program to generate the first n terms of the sequence. - a) Write a C program to construct a pyramid of numbers.

b) Write a C program to calculate the following Sum: - a) The least common multiple (lcm) of two positive integers a and b is the smallest integer that is evenly divisible by both a and b. Write a C program that reads two integers and calls lcm (a, b) function that takes two integer arguments and returns their lcm. The lcm (a, b) function should calculate the least common multiple by calling the gcd (a, b) function and using the following relation: LCM (a,b) = ab / gcd (a,b)

b) Write a C program that reads two integers n and r to compute the ncr value using the following relation: ncr (n,r) = n! / r! (n-r)! . Use a function for computing the factorial value of an integer. - Write C program that reads two integers x and n and calls a recursive function to compute x n

b) Write a C program that uses a recursive function to solve the Towers of Hanoi problem.

c) Write a C program that reads two integers and calls a recursive function to compute ncr value. - a) Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied by the user using Sieve of Eratosthenes algorithm.

b) Write a C program that uses non recursive function to search for a Key value in a given list of integers. Use linear search method. - a) Write a menu-driven C program that allows a user to enter n numbers and then choose between finding the smallest, largest, sum, or average. The menu and all the choices are to be functions. Use a switch statement to determine what action to take. Display an error message if an invalid choice is entered.

b) Write a C program that uses non recursive function to search for a Key value in a given sorted list of integers. Use binary search method. - a) Write a C program that implements the Bubble sort method to sort a given list of integers in ascending order.

b) Write a C program that reads two matrices and uses functions to perform the following:

i) Addition of two matrices

ii) Multiplication of two matrices - a) Write a C program that uses functions to perform the following operations:

i) to insert a sub-string into a given main string from a given position.

ii) to delete n characters from a given position in a given string.

b) Write a C program that uses a non recursive function to determine if the given string is a palindrome or not. - a) Write a C program to replace a substring with another in a given line of text.

b) Write a C program that reads 15 names each of up to 30 characters, stores them in an array, and uses an array of pointers to display them in ascending (ie. alphabetical) order. - a) 2’s complement of a number is obtained by scanning it from right to left and complementing all the bits after the first appearance of a 1. Thus 2’s complement of 11100 is 00100. Write a C program to find the 2’s complement of a binary number.

b) Write a C program to convert a positive integer to a roman numeral. Ex. 11 is converted to XI. - a) Write a C program to display the contents of a file to standard output device.

b) Write a C program which copies one file to another, replacing all lowercase characters with their uppercase equivalents.

**Reference Books:**

- Mastering C, K.R. Venugopal and S.R. Prasad, TMH Publishers.
- Computer Programming in C, V. Rajaraman, PHI.
- Programming in C, Stephen G. Kochan, Fourth Edition, Pearson Education.
- C++: The complete reference, H. Schildt, TMH Publishers.

All details and yearly new syllabus will be updated here time to time. Subscribe, like us on facebook and follow us on google plus for all updates.

Do share with friends and in case of questions please feel free drop a comment.