FirstRanker's choice
14PCD13
--- Content provided by FirstRanker.com ---
USN
First Semester B.E. Degree Examination, Dec.2014/Jan.2015
Programming in 'C' and Data Structures
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, selecting atleast ONE questions from each part.
--- Content provided by FirstRanker.com ---
PART 1
- a. What is pseudocode? Explain with an example. (04 Marks)
b. Explain the structure of C program with an example. (06 Marks)
c. Explain any five operators used in C language. (10 Marks) - a. What is type conversion? Explain two types of type conversions with examples. (06 Marks)
--- Content provided by FirstRanker.com ---
b. Write a program in C to find the area and perimeter of a rectangle. (06 Marks)
c. Define : i) Variable ii) Constant iii) Associativity iv) Precedence. (08 Marks)
PART - 2
- a. What is two way selection statement? Explain if, if—else, nested if-else and cascaded if-else with examples and syntax. (10 Marks)
b. Write a program that takes three coefficients (a, b, and c) of a quadratic equation : (ax2 + bx + c) as input and compute all possible roots and print them with appropriate messages. (10 Marks) - a. Explain switch statement with an example. (06 Marks)
b. What is a loop? Explain the different loops in C language. (10 Marks)
c. Show how break and continue statements are used in a C program, with example. (04 Marks)
--- Content provided by FirstRanker.com ---
PART 3
- a. What is an array? How is a single dimension array is declared and initialized? (06 Marks)
--- Content provided by FirstRanker.com ---
b. Write a C program to evaluate the polynomial f(x) = a4x4 + a3x3 + a2x2 + a1x + a0, for a given value of x and its coefficients using Homer's method. (06 Marks)
c. Explain string manipulation functions, with examples. (08 Marks) - a. What is a function? Write a function to find the sum of two numbers. (06 Marks)
b. Explain the two categories of argument passing techniques, with examples. (06 Marks)
c. Write a C function isprime(num) that accepts an integer argument and returns 1 if the argument is a prime or a 0 otherwise. Write a program that invokes this function to generate prime numbers between the given ranges. (08 Marks)
--- Content provided by FirstRanker.com ---
PART 4
- a. What is structure data type? Explain. (04 Marks)
b. Show how a structure variable is passed as a parameter to a function, with an example (06 Marks)
c. Explain the concept of array of structures, with a suitable C program. (10 Marks) - a. What is a file? Explain fopen( ), fclose() functions. (04 Marks)
--- Content provided by FirstRanker.com ---
b. Explain how the input is accepted from a file and displayed. (06 Marks)
c. Given two text documentary files "Ramayana-in" and "Mahabharatha-in". Write a C program to create a new file "Karnataka-in" that appends the content of the file "Ramayana-in" to the file "Mahabharatha-in". Also calculate the number of words and new lines in the output file. (10 Marks)
I of 2
FirstRanker's choice
--- Content provided by FirstRanker.com ---
14PCD13
PART – 5
- a. What is a pointer? Write a program in C to find the sum and mean of all elements in an array. Use pointer technology. (08 Marks)
b. What is preprocessor directive? Explain #define and #include preprocessor directives. (08 Marks)--- Content provided by FirstRanker.com ---
c. Explain : i) Dynamic memory allocation ii) Malloc function. (04 Marks) - a. What are primitive and non primitive datatypes? Explain. (06 Marks)
b. Define queue. Explain it along with its application. (08 Marks)
c. Explain: i) Abstract data type ii) Stack iii) Linked list. (06 Marks)
**
--- Content provided by FirstRanker.com ---
KLECET||
2 of 2
--- Content provided by FirstRanker.com ---
This download link is referred from the post: VTU B.Tech 1st Year Last 10 Years 2011-2021 Question Papers