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

Theory Questions (3 Marks)

The document contains a series of theory questions and programming tasks related to C programming, organized into four modules: Fundamentals, Arrays and Strings, Functions and Structures, and Pointers and File Handling. Each module includes questions that differentiate concepts, explain functions, and require programming examples. The questions cover various aspects of C programming, including data types, control structures, string manipulation, and file operations.

Uploaded by

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

Theory Questions (3 Marks)

The document contains a series of theory questions and programming tasks related to C programming, organized into four modules: Fundamentals, Arrays and Strings, Functions and Structures, and Pointers and File Handling. Each module includes questions that differentiate concepts, explain functions, and require programming examples. The questions cover various aspects of C programming, including data types, control structures, string manipulation, and file operations.

Uploaded by

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

KTU - Programming in C (EST102) Theory Questions

Module 1: Fundamentals of C Programming

1. Differentiate between system software and application software.

2. Differentiate between compiler and interpreter.

3. What is the importance of precedence and associativity? Write the table for operator precedence.

4. Differentiate between 'break' and 'continue' statements.

5. Write short notes on processor and memory in a computer.

6. What is a flowchart? Draw the flowchart to check whether a given number is positive or negative.

7. Write the difference between 'while' and 'do-while' statements.

8. Explain various formatted I/O statements in C.

9. What are the differences between compiled and interpreted languages? Give examples for each.

10. Is it advisable to use 'goto' statements in a C program? Justify your answer.

Module 2: Arrays and Strings

1. Explain any three string handling functions using examples.

2. Write a C program to find the occurrence of each element in an array.

3. What is an array? Illustrate using an example how a single-dimensional array is initialized.

4. Explain the different ways in which you can declare and initialize a single-dimensional array.

5. Write a C program to read a sentence through the keyboard and display the count of white

spaces in the given sentence.

6. Write a C program to find the length of a string without using string handling functions.

7. Write a C program to check whether a string is a palindrome or not without using string handling

functions.

8. Write a C program to concatenate two strings without using built-in string functions.

Module 3: Functions and Structures

1. Define formal parameters and actual parameters. Illustrate with an example.

2. With examples, show how: (i) An array is passed as an argument to a function. (ii) Individual
elements of an array are passed as arguments to a function.

3. What is recursion? Write a C program to display the Fibonacci series using a recursive function.

4. Write a C program to sort N numbers using functions.

5. What are different storage classes in C? Give examples for each.

6. Write a C program to find the sum and average of an array of integers using user-defined

functions.

7. Differentiate between structure and union using an example.

8. Declare a structure named 'Student' and write a program in C to find the average mark using an

array of structures.

Module 4: Pointers and File Handling

1. Differentiate between the address operator (&) and indirection (*) operator.

2. Explain how pointers can be passed to functions in C.

3. Differentiate between array of pointers and pointer to an array.

4. What is meant by the scale factor of a pointer variable? Explain using examples.

5. List out the various modes of opening a file in C language.

6. Explain any five file handling functions in C.

7. Write a C program to copy the contents of one file into another.

8. Write a C program to count the number of lines in a text file.

9. Write a C program to reverse a string using pointers.

You might also like