Вы находитесь на странице: 1из 6

Department of Information Technology

Computer Programming LAB Experiments List Academic Year 2011-2012 I B.Tech Electrical Electronics Engineering - A

Prepared
by

MUNI SEKHAR VELPURU


Assistant Professor, Department of Information Technology.

VARDHAMAN COLLEGE OF ENGINEERING


(Autonomous)
Shamshabad 501 218, Hyderabad.

COMPUTER PROGRAMMING LAB EXPERIMENTS

S. No Name of the program Evaluation Expression and Operators: 01 Write C program to the following : a) To evaluate algebraic exp(ax+b)/(ax-b) b) To Evaluate algebraic expression (2.5logx+cos32+|x*x-y*y|+sqrt(2*x*y)) c) To evaluate the algebraic exp ae-rt d) To evaluate algebraic expression ( x power5 +10 x power 4+8 x power3+4x+2). 02 Find the gross salary of the employee where basic is given and da is 40 of basic and hra is 20 of basic. 03 Display your class time table using C program. 04 Write a C program to following : a) Swapping of two variables with using third variable. b) Swapping of the two values without using third variable. c) Swapping of three variables with using another variable. d) Swapping of three variables without using fourth variable. 05 Find the area and circumference of the following : (a). Circle (b). Square (c). Triangle 06 Write a C program to find the roots of a quadratic equation. 07 Write a C program to find coefficient of 2, without dividing with 2 and without division operator. Control Statements: 08 Find the greatest of number among the three numbers using conditional operator. 09 Write a C program to to perform the arithmetic operations using switch-case-break statement. 10 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 to generate the first n terms of the Fibonacci sequence. 11 Write a C program to print output as follows : a) 1 b) 1 c) 1 d) 1 22 2 2 22 23 333 3 3 3 333 4 56 12 Write a C program for the following : a) To print prime number until n. b) Sum of n natural numbers. c) Total number of Even and odd numbers until n. d) Write a C program to print Fibonacci series until n. 13 To write a C program a) to find the 2 s compliments of a binary number. b) to convert a Roman numeral to its decimal equivalent. 14 To write a C program to read in two numbers, x and n, and then compute the sum of this geometric progression 1+x+x2+x3+ xn . For example: if n is 3 and x is 5, then the program computes 1+5+25+125. Print x, n, the sum. Perform error checking. For example the formula does not make sense for negative Exponents if n is less than 0. Have your program print an error message if n<0, then go back and read in the nest pair of numbers of without computing the sum. Are any values of x also illegal? If so, test for them too. 15 write a C program to read a number n, and a digit d, and check whether d is present in the number n. If is so, find out the position of the d in the number.

S. No Arrays 16

Name of the program

a) Write a C program to read and display the matrix. b) Write a C program to find determinate of a matrix. c) Write a C program to find the product of two given matrices.

17 Write a C program to find the element the given array of integer elements. 18 Write a C program to find the sum of the array elements. Functions 19 Write a C program to the following : a) Find the factorial of a number using non-recursive functions. b) Find the factorial of a number using recursive function. c) Swapping of two values using call by value d) Swapping of two values using call by Reference. e) Find the GCD(Greatest Common Divisor) of two integer. Strings Write a C program for the following 20 a) Copy a string from source string to target string without using string function. b) Copy a string from source string to target string with using string function. c) Reverse the given string without using string function. d) Reverse the given string with using string function. e) Find the length of the given string without using string functions. f) Find the length of the given string without using string functions. Write a C program to convert all lower case to uppercase characters in given string 21 without using string functions. Write a C program to sort the given string in ascending order. 22 Write a C program to find the character position in the given string. 23

Pointers
Write a C program to Demonstrate the addresses and values of the two pointer variables , where first pointer reference to a normal variable value and second variable reference to first pointer variable. 25 Write a C program to perform arithmetic operation such as addition and subtraction on pointer ptr : a) Ptr+1, ptr-1, ptr+5 where ptr is reference to integer data type. b) Ptr+1, ptr-1, ptr+5 where ptr is reference to double data type. c) Ptr+1 where ptr is reference to float array[5] data type. 26 Write a C program to call a function using pointer function and display the result of the function. Structures and Unions To write a C program to perform the following operations 27 24
a) Reading a complex number b) Writing a complex number c) Addition of 2 complex numbers d) Multiplication of 2 complex numbers (Note: represent complex number using a structure) Write a C program to display list of product details such as product name, product 28 manufacture name, Price of the product and place of manufacturing using structures and Unions. Console vs Files

29

To write a C program a) To copy the contents from one file to another. b) To reverse the first n characters in a file. (Note: the file name and n are specified on the command line) c) to fine the no. of characters, no. of words, no. of lines in a given file.

Assignment
Roll No. 11A10201 11A10202 11A10203 11A10204 11A10205 11A10206 11A10207 11A10208 11A10209 11A10210 11A10211 11A10212 11A10213 11A10214 11A10215 11A10216 11A10217 11A10218 11A10219 11A10220 11A10221 11A10222 11A10223 11A10224 11A10225 11A10226 11A10227 11A10228 11A10229 11A10230 11A10231 11A10232 11A10233 Assignment No. Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Write a C program to find given numbers untill n. Write a C program to find given number is perfect number or not. Write a C program to find given number is palindrom or not. Write a C program to find given number is vowel or not with using switch, without using switch statement and using functions. Write a C program to Reverse an array elements. Write a C program to sort given integer array. Write a C program to search for number in given array. Description Write a C Program to Sort your class Name from first to last in accesding order. Signature

11A10234 11A10235 11A10236 11A10237 11A10238 11A10239 11A10240 11A10241 11A10242 11A10243 11A10244

Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II Assinment II

Вам также может понравиться