KEMBAR78
Programming in C | PDF | C (Programming Language) | Computer Program
0% found this document useful (0 votes)
50 views5 pages

Programming in C

The document consists of a series of questions related to the C programming language, covering topics such as keywords, output of code snippets, string operations, memory allocation, and file handling. It includes both theoretical questions and practical programming tasks, divided into two parts with multiple sub-questions. The questions aim to assess understanding of C programming concepts, syntax, and functionalities.

Uploaded by

sowmisoms0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views5 pages

Programming in C

The document consists of a series of questions related to the C programming language, covering topics such as keywords, output of code snippets, string operations, memory allocation, and file handling. It includes both theoretical questions and practical programming tasks, divided into two parts with multiple sub-questions. The questions aim to assess understanding of C programming concepts, syntax, and functionalities.

Uploaded by

sowmisoms0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Answer ALL questions.

PART A-(10x2=20 marks)

1.List at least any ten keywords in C language.

2. What is the output of the following program?

#include <stdio.h>

int main()

int i;

i=1, 2, 3;

printf ("%d", i);

return 0;

3. What is the output of the following code

int main()

int a[4]={1, 2, 3, 4);

++;

printf("%d", *a);

return 0;

4. What will be the value of var for the following String Operations statement in C language?

var stremp ("Hello", "World");

5. How the pow() function is defined and which header file provides it?

6. Differentiate pass by reference and pass by value in C.

7. How the nested structure can define in C, explain with syntax and examp

8. What will be the output of the following C code?

#include<stdio.h>

main()
typedef int a;

a b=2,c=8, d;

d=(b2)/2+8;

printf ("%d", d);

9. What is the typedef function in C?

10. List the properties of Command-Line arguments in C.

PART B-(5x16= 80 marks)

11. (a) (1) Discuss the structure of C program in detail and explain with simple hello world program.

(ii) Explain the terms variables and constants. How many variables are supported by C.

Or

(b) (i) What is purpose of Decision Control Statements in C? Explain any two of such types with the
general form of simple statements.

(ii) What are the functionalities of Preprocessor and Compiler? Explain with a simple example.

12. (a) (i) Compare one dimensional and two dimensional array. Explain the use of multi-dimensional
arrays with syntax and example. (10)

(ii) Explain the four string functions with suitable examples. (6)

Or

(b) (1) Write an algorithm to sort an array of integers in ascending order using selection sort and find its
time complexity. (10)

(ii) Write a simple binary search program using an iterative method. (6)

13. (a) (1) Write different types of functions with respect to return type arguments and explain all types
with syntax and example. (10)

(ii) Explain the header file that contains various methods for performing mathematical operations. (6)

Or

(b)(i)Discuss call by value and call by reference with some simple program. (10)

(ii) What is a recursive function? Write a simple binary search algorithm using recursive functions. (6)

14. (a) Explain in detail about the dynamic memory allocation process and list memory
allocation/deallocation functions(16)

Or

(b) Discuss the concepts, advantages of self-referential structures and its types and explain with an
example program. (16)
15. (a) What is File Organization? Explain its types with pros and cons. (16)

Or

(b) (i) What is a File and list any five operations that can be performed on a file. (8)

(ii) What are command line arguments in C? Explain with a suitable program. (8)
Answer ALL questions.

PART A-(10x2=20 marks)

1. Write short notes on Keywords in C language.

2. What is difference between the statements a 5 and a 5 in language C?

3. Write down the syntax for array declaration.

4 What is the purpose and prototype of the function 'strepy'?

5. Define the term recursion in language C.

6. What is the relation between the operators '&' and in C pointers?

7. In language C can we allocate memory dynamically? How?

8. What are the key differences between structure and union?

9. What will be the impact if 'fclose() function is avoided in a file handling C program?

10. What are command line arguments?

PART B-(5x16=80 marks)

11. (a) Draw the structure of a C program and explain each part in detail.

Or

(b) Enumerate the difference between 'else-if ladder' and 'switch case statements with appropriate C
programs.

12. (a) (6) What is an array? Explain about various types of arrays in detail. (8)

(ii) Explain the usage of 'strcat() with an C program. (8)

Or

(b) (1) Differentiate binary search from linear search. (8)

(ii) Write a C program to compare two strings without using the function 'stremp()'. (8)

13. (a) What is modular Programming? How does the Language C support modular programming?
Explain in detail.

Or

(b) What is the necessity of parameter passing in C Programs? What are the two types of doing that?
Explain any one in detail.

14. (a) (1) What is the purpose of the concept 'structure in Language C? Explain in detail with an
example program(8)

(ii) Why is singly linked list called as self-referential structure? Explain. (8)
Or

(b) (1) Write short notes on 'Array of structures'(8)

(ii) Write a comparative analysis on various storage classes of language C. (8)

15. (a) What is file? What are facilities available in language C to handle files? Explain.

Or

(b) Explain the various file accessing policies available in language C with appropriate programs.

You might also like