FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download VTU B-Tech/B.E 2019 June-July 1st And 2nd Semester 2015 June-July 14PCD13 Programming in C and Data Structures Question Paper

Download VTU ((Visvesvaraya Technological University) B.E/B-Tech 2019 July ( Bachelor of Engineering) First & Second Semester (1st Semester & 2nd Semester) 2015 June-July 14PCD13 Programming in C and Data Structures Question Paper

This post was last modified on 01 January 2020

This download link is referred from the post: VTU B.Tech 1st Year Last 10 Years 2011-2021 Question Papers


14PCD13/23

First/Second Semester B.E. Degree Examination, June/July 2015

Programming in C and Data Structures

--- Content provided by FirstRanker.com ---

Time: 3 hrs.

Max. Marks: 100

Note: Answer FIVE questions, selecting ONE full question from each part.

PART-1

  1. a. What are data types? Mention the different data types supported by C language, giving an example to each. (05 Marks)

    --- Content provided by FirstRanker.com ---

    b. Write a C program which takes as input p, t, r, compute the simple interest and display the result. (05 Marks)
    c. What is an operator? List and explain various types of operators. (10 Marks)
  2. a. What is a token? What are different types of tokens available in C language? Explain. (08 Marks)
    b. Write C expressions corresponding to the following (Assume all quantities are of same type):
    1. A = 5x+3y
    2. --- Content provided by FirstRanker.com ---

    3. B = √(s(s - a)(s - b)(s - c))
    4. C = e(x+y-10)
    5. D = 1/(x+y)
    6. X = (-b ± √(b² - 4ac)) / 2a
    (06 Marks)

    --- Content provided by FirstRanker.com ---

    c. What is the value of `x` after the following code segments? Justify your answers:
    1. int a, b;
      float x;
      a = 4;
      b = 5;

      --- Content provided by FirstRanker.com ---

      x = b/a;
    2. int a, b;
      float x;
      a = 4;
      b = 5;

      --- Content provided by FirstRanker.com ---

      x = (float) b/a;
    (06 Marks)

PART-2

  1. a. What are different types of conditional decision-making statements? Explain each with examples. (10 Marks)
    b. Write a C program to simulate a simple calculator that performs arithmetic operations using a switch statement. An error message should be displayed if any attempt is made to divide by zero. (10 Marks)
  2. --- Content provided by FirstRanker.com ---

  3. a. Explain with examples formatted input-output statements in C. (06 Marks)
    b. List four differences between while loop and do-while loop along with syntax and example. (06 Marks)
    c. Design and develop a C program to reverse a given four-digit integer number and check whether it is a palindrome or not. (08 Marks)

PART-3

  1. a. What is an array? Explain different methods of initialization of single-dimensional arrays. (06 Marks)

    --- Content provided by FirstRanker.com ---

    b. Write a C program to read N integers into an array A and to:
    1. find the sum of odd numbers
    2. find the sum of even numbers
    3. find the average of all numbers
    Output the results computed with appropriate headings. (06 Marks)

    --- Content provided by FirstRanker.com ---

    c. How is a string declared and initialized? Explain any FOUR string manipulation functions with examples. (08 Marks)
  2. a. Explain function call, function definition, and function prototype with examples to each. (06 Marks)
    b. What are actual parameters and formal parameters? Illustrate with an example. (06 Marks)
    c. What is recursion? Write a C program to compute the factorial of a given number 'n' using recursion. (08 Marks)

PART-4

--- Content provided by FirstRanker.com ---

  1. a. How is a structure different from an array? Explain the declaration of a structure with an example. (06 Marks)
    b. Explain with an example, how to create a structure using `typedef`. (04 Marks)
    c. Write a C program to input the following details of 'N' students using structure:
    Roll No: integer, Name: string, Marks: float, Grade: char
    Print the names of the students with marks >= 70.0%. (10 Marks)
  2. --- Content provided by FirstRanker.com ---

  3. a. Explain the following file operations along with syntax and examples:
    1. fopen()
    2. fgetc()
    3. fscanf()
    4. fprintf()
    5. --- Content provided by FirstRanker.com ---

    6. fgets()
    (10 Marks)
    b. Write a C program to read the contents from the file called abc.txt, count the number of characters, the number of lines, and the number of white spaces, and output the same. (10 Marks)

PART-5

  1. a. Explain the point variable. Explain with an example, the declaration and initialization of a pointer. (06 Marks)

    --- Content provided by FirstRanker.com ---

    b. Explain the following C functions along with syntax and example to each:
    1. malloc()
    2. calloc()
    3. realloc()
    4. free()
    5. --- Content provided by FirstRanker.com ---

    (08 Marks)
    c. Develop a C program to read two numbers and function to swap these numbers using pointers. (06 Marks)
  2. Write short notes on the following:
    a. Preprocessor directives
    b. Primitive and non-primitive data types

    --- Content provided by FirstRanker.com ---

    c. Stack operations
    d. Types of queues (20 Marks)

FirstRanker.com


--- 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