Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views5 pages

ESC-CS01 PPS Tutorial - Sheets

Uploaded by

senp26225
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)
8 views5 pages

ESC-CS01 PPS Tutorial - Sheets

Uploaded by

senp26225
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/ 5

Module 1: Basics of C Programming

Topics:
- History of C language
- Applications
- Structure of C program
- Data types, Character set, Variables, Keywords, Constants
- C Instructions, Operators, Precedence & Associativity
- Storage classes
- Input/Output
- Control statements & Jump statements
Practice Questions:
1. Write a C program to check whether a number is even or odd.
2. Explain the difference between while and do-while loop with examples.
3. Write the structure of a C program and explain its parts.
4. List the storage classes in C and explain their use.
5. What is the precedence of * and + in C? Give example.
6. Write a program to find the largest of three numbers using if-else.
7. Differentiate between break and continue statements with an example.
8. What are keywords? List any 10 keywords in C.
9. Write a program to print a multiplication table of a number.
10. Explain associativity of operators with an example.
Module 2: Functions and Arrays
Topics:
- Functions: declaration, definition, arguments, return values
- Recursion
- Arrays: declaration, initialization, 1-D & multi-D arrays
Practice Questions:
1. Write a function to find factorial of a number.
2. Differentiate between call by value and call by reference.
3. Write a recursive function to calculate Fibonacci series up to n terms.
4. Declare and initialize a 1-D array to store marks of 5 students.
5. Write a program to add two matrices.
6. Explain advantages of using functions in a program.
7. Write a program to find the maximum number in an array.
8. Create a function that accepts an array and returns the sum of its elements.
9. What is recursion? Give an example program.
10. Write a program to store and print elements of a 2-D array.
Module 3: Pointers and Strings
Topics:
- Pointers: variables, operators, expressions
- Pointer & arrays, call by value/reference
- Passing arrays/strings to functions
- Array of pointers, pointer to array
- Pointer to function, dynamic memory allocation
- Strings: declaration, initialization, operations, array of strings
Practice Questions:
1. Declare a pointer to an integer and store the address of a variable. Print the value using pointer.
2. Write a program to swap two numbers using call by reference.
3. Explain difference between pointer to an array and array of pointers.
4. Write a program to concatenate two strings without using library function.
5. What is the use of malloc() and free() functions? Give example.
6. Write a program to find the length of a string using a pointer.
7. Pass a string to a function and print it in reverse order.
8. Write a program to store 5 strings and print them.
9. Explain pointer to function with an example.
10. Write a program to copy a string without using strcpy().
Module 4: Aggregate Data Types
Topics:
- Structures: declaration, initialization, passing to functions
- Array of structures, array within structures
- Pointers and structures
- Uses of structures
- Unions, enumerations
Practice Questions:
1. Define a structure Student with members roll_no, name, marks. Input and display details of a student.
2. Write a program to store data of 5 employees using array of structures.
3. Differentiate between structure and union with example.
4. Create a structure containing an array as a member and initialize it.
5. Write a program to pass a structure to a function and display its data.
6. What is the size of a union with members int and char? Explain.
7. Declare and use an enum for days of the week.
8. Write a program using pointer to structure to input and display data.
9. Explain the use of array within structure with example.
10. Write a program to store and print marks of students using nested structures.
Module 5: Files, Preprocessor Directives & Advanced Topics
Topics:
- Files: modes, functions, operations
- Text & binary files
- Command line arguments
- Preprocessor directives (#define, #include)
- User-defined header files
Practice Questions:
1. Write a program to create a text file and write some data into it.
2. Write a program to read a file and display its contents.
3. Differentiate between text and binary file.
4. Write a program to copy contents of one file into another.
5. Explain the purpose of #define and #include with example.
6. Write a program to accept file name as command line argument and print its contents.
7. How to create and use a user-defined header file in C? Give example.
8. Write a program to count the number of words in a file.
9. What is the difference between fscanf() and scanf()?
10. Write a program to store and retrieve records from a binary file.

You might also like