0% found this document useful (0 votes)
37 views2 pages

R10 CP Set 2

This document is a test for a Computer Programming course covering topics like: - Command line arguments - Break statements - Defining array sizes with symbolic constants - Differences between arrays and variables - Structure initialization - Automatic and static variables - Global and local variables - Flowcharts - Structures within structures and how they are stored in memory - File handling functions - Pointer usage to arrange numbers in ascending order - Function structure and passing arguments/return values - Increment/decrement and conditional operators - Automatic type conversion - Algorithm to find quadratic equation roots - Variable space requirements - Function to sort an array - Differences between getchar and scanf - Program

Uploaded by

Chaitanya Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

R10 CP Set 2

This document is a test for a Computer Programming course covering topics like: - Command line arguments - Break statements - Defining array sizes with symbolic constants - Differences between arrays and variables - Structure initialization - Automatic and static variables - Global and local variables - Flowcharts - Structures within structures and how they are stored in memory - File handling functions - Pointer usage to arrange numbers in ascending order - Function structure and passing arguments/return values - Increment/decrement and conditional operators - Automatic type conversion - Algorithm to find quadratic equation roots - Variable space requirements - Function to sort an array - Differences between getchar and scanf - Program

Uploaded by

Chaitanya Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

SET NO : 2 Sreenidhi Institute of Science & Technology (An Autonomous Institution)

A 10

Code No: 101IT01 B. TECH. I Year I Semester Examinations, February, 2011 (Regular) COMPUTER PROGRAMMING (Common to CSE, IT & ME) Time: 3 Hours Max. Marks : 70

Note : No additional answer sheets will be provided.


Part-A (Objective Type) Max.Marks:20 ANSWER ALL QUESTIONS.
1. 2. 3. Explain the command line arguments. What is the purpose of break statement? What advantage is there in defining an array size in terms of a symbolic constant rather than a fixed integer quantity? 4. 5. 6. 7. 8. 9. 10. In what way an array is different from an ordinary variable? What restrictions apply to values that can be assigned to subscripts? What is a structure? How it is initialized? Distinguish between the Automatic and static variables. Explain the effect of the following statements: int a, *b = &a Distinguish between the Global and local variables. What is a flowchart?

Page 1 of 2

Part B Max. Marks: 50 ANSWER ANY FIVE QUESTIONS. EACH QUESTION CARRIES 10 MARKS.
1. (a) (b) 2. 3. What is a structure within structure? Give an example. How are structure elements stored in memory? [5M] [5M] [ 10 M ]

Elaborately discuss about the file handling functions in C.

Write a C program to arrange the given numbers in ascending order using pointers. [ 10 M ] [2M]

4.

(a) (b)

What do you mean by functions?

Give the structure of the functions and explain about the arguments and [ 8 M ] their return values.

5.

(a)

Explain the following and illustrate it with an example each. (i) Increment and decrement operator (ii) Conditional operator

[5M]

(b)

State the rules that apply while evaluating expression in automatic type Conversion.

[5M]

6.

(a) (b)

Write an algorithm to find the roots of quadratic equation for all the cases. [ 5 M ] Write about space requirements for variables of different data types. [5M] [ 10 M ] [5M] [5M]

7. 8.

Write a C program that uses a function to sort an array of integers. (a) (b) Distinguish between getchar and scanf functions for reading strings. Write a C program to print the Pascal's triangle.

Page 2 of 2

You might also like