VTU First Year Engineering (C Cycle) (Semester 1)
Programming in C and Data Structures
December 2014
Programming in C and Data Structures
December 2014
1(a)
What is pseudo code? How it is used as a prob
lem-solving tool.
6 M
1(b)
What is an operator? Explain the arithmetic, relational, logical, and assignment operators in C language.
10 M
1(c)
Write a program in C to print the numbers from 4 to 9
and their squares.
4 M
2(a)
Write and explain the basic concepts of a C program.
8 M
2(b)
Write the guidelines to use printf() function in C language.
8 M
2(c)
Write a program in C to find the area and perimeter of a circle.
4 M
3(a)
Explain the two way selection (if, if-else, nested if- lse, cascaded if-else) in C language with syntax .
8 M
3(b)
Explain the switch statement with syntax and example.
8 M
3(c)
Design and develop a C program to read a
year as an input and find whether it is leap year or not. Also consider end of the centuries.
4 M
4(a)
Explain the different types of loops in C with syntax a
nd example.
8 M
4(b)
Explain the use of break and continue statement in
loops with example.
6 M
4(c)
Design and develop a C program to reverse of an integer number NUM and check whether it is PALINDROME or NOT.
6 M
5(a)
What is an array? Explain the declaration and initialization of one and two dimensional arrays with example.
6 M
5(b)
Explain void and parameter less functions in C with examples.
6 M
5(c)
Write a C program that:
i. Implements string copy operation STRCOPY (str1,str2) that copies a string str1 to another string str2 without using library function.
ii. Reads a sentence and prints frequency of each of the vowels and total count of consonants.
i. Implements string copy operation STRCOPY (str1,str2) that copies a string str1 to another string str2 without using library function.
ii. Reads a sentence and prints frequency of each of the vowels and total count of consonants.
8 M
6(a)
Explain any five string manipulation library functions with examples.
10 M
6(b)
What is function parameter? Explain different types of parameters in C functions.
4 M
6(c)
Write a C function isprime (num) that accepts an integer argument and returns 1 if the argument is prime, a 0 otherwise. Write a C program that
invokes this function to generate prime numbers between the given ranges.
6 M
7(a)
What is a structure? Explain the syntax of structure declaration with example.
4 M
7(b)
What is a file? Explain how the file open and file close
functions handled in C.
6 M
7(c)
Write a C program to maintain a record of
n"student details using an array of structures with four fields (Roll number
10 M
8(a)
Explain array of structures and structure within
a structure with examples.
8 M
8(b)
Explain how the structure variable passed as a param
eter to a function with example.
6 M
8(c)
Write a C program to read and display a text from the file.
6 M
9(a)
What is a pointer? Explain how the pointer variable de
clared and initialized.
4 M
9(b)
What is dynamic memory allocation? Write and explain the different dynamic memory allocation functions in C.
6 M
9(c)
What are primitive and non-primitive data types?
4 M
9(d)
Write a C program to swap two numbers using call by pointers method.
6 M
10(a)
Explain the array of pointers with example.
4 M
10(b)
Write and explain any two preprocessor directives in C.
4 M
10(c)
What is a stack? Explain it with its applications.
4 M
10(d)
Write a C program to read n unsorted numbers to a
n array of size n and pass the address of this array to a function to sort the numbers in ascending order using bubble sort technique.
8 M
More question papers from Programming in C and Data Structures