Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
165 views

C Programming Lab

This document outlines the course objectives, outcomes, and exercises for a C Programming Lab. The objectives are to teach students C programming and data structures like lists, stacks, queues, trees and graphs. By the end of the course, students should be able to design and write C programs to solve simple problems, as well as work with arrays, structures, unions, files, and recursive/non-recursive functions. It provides 13 exercises engaging with these concepts and 10 web links for additional C programming resources.

Uploaded by

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

C Programming Lab

This document outlines the course objectives, outcomes, and exercises for a C Programming Lab. The objectives are to teach students C programming and data structures like lists, stacks, queues, trees and graphs. By the end of the course, students should be able to design and write C programs to solve simple problems, as well as work with arrays, structures, unions, files, and recursive/non-recursive functions. It provides 13 exercises engaging with these concepts and 10 web links for additional C programming resources.

Uploaded by

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

C PROGRAMMING LAB

I-B.Tech I-Sem

Course Objectives:

To make the student learn a programming language.

To teach the student to write programs in C solve the problems

To Introduce the student to simple linear and non linear data structures
such as lists, stacks, queues, trees and graphs

Course Outcomes:
At the end of the course, the student should be able to:

Design C Programs.

Write and execute C programs for simple applications

Exercise l

Write a C program to Temperature Conversion from Fahrenheit to Celsius

Write a C Program to calculate the area of triangle using the formula area
= ( s (s-a) (s-b)(s- c))1/2 where s= (a+b+c)/2

Write a C Program to swap two numbers without using a temporary


variable.

Exercise 2

Write a C program to find the largest of three numbers using ternary


operator.

Write a C program to find the roots of a quadratic equation.

Write a C program, which takes two integer operands and one operator
form the user, performs the operation and then prints the result. (Consider
the operators +,-,*, /, % and use Switch Statement)

Exercise 3

Write a C program to find the sum of individual digits of a positive integer

Write a C program to find the given number is palindrome number or not

Write a C program to generate all the prime numbers between 1 and n,


where n is a value supplied by the user.

Exercise 4

Write a C Program to print the multiplication table of a given number n up to


a given value, where n is entered by the user.

Write a C Program to enter a decimal number, and calculate and display


the binary equivalent of that number.

Write a C Program to check whether the given number is Armstrong


number or not.

Exercise 5

Write a C program to generate the first n terms of the sequence Use the
summing series method to compute the value of SIN(x),COS(x)

Write a C function to generate Pascals triangle

Write a C program to implement a liner search.

Exercise 6

Write a C program to perform addition of two input matrices

Write a C program to perform multiplication of two input matrices

Exercise 7
Write C Programs for the following string operations without using the built in
functions

to concatenate two strings

to copy a string to another string

to compare two strings

Exercise 8
Write C Programs for the following string operations without using the built in
functions

to find t he length of a string

to find whether a given string is palindrome or not

Exercise 9

Write C programs illustrating call by value and call by reference concepts

Write a C program to interchange the largest and smallest numbers in the


array.

Exercise 10
Write C programs that use both recursive and non-recursive functions for the following

To find the factorial of a given integer

To find Fibonacci sequence

Exercise 11

Write C Program to implement the arrays of the structure and arrays within the structure

Write a C Program to compare two arrays using pointers

Exercise 12
Examples which explores the use of structures, union and other user defined variables

Exercise 13

Write a C program which copies one file to another.

Write a C program to count the number of characters and number of lines in a file.

Write a C Program t merge two files into a third file. The names of the files must be entered using command
line arguments.

Web Links:

http://www.c4learn.com/
http://www.programmingsimplified.com/c-program-examples

You might also like