CP Part B Questions
CP Part B Questions
1. Structure of C program
Draw the structure and explain the each sction
2. operators
● Definition (what is operator)
● List out the types
● Explain each and every operator with symbol and ex
4. Programs
➔ Leap year or not (if and if else statement)
➔ Largest among three numbers (else if and nested statement)
➔ Sum of n numbers
➔ Number palindrome
Unit 2
1. Arrays
● Definition
● Array structure with diagram
● List out the types
● Explain each types
(ex
❖ Definition
❖ Syntax(declaration , initialization )
❖ Example
❖ Draw the structure with index value (how data store in array)
❖ Explain
Repeat the steps for all types
2. String
● Definition
● Syntax(declaration , initialization )
● Example
● Draw the structure with index value (how data store in array)
● Explain
● List of string functions
● Explain each string funcion
(ex
1, strlen()
➢ Definition
➢ Syntax
strlen(str_var) ;
➢ Example
Char s1[30]=”programming”;
Int a= strlen(s1);
)
Repeat the above steps for all functions
3. Programs
➔ Linear search
➔ Binary search
➔ Sorting
➔ Matrix programs
➔ String palindrome(with string function and without string functions)
Unit 3
1. Functions
● Definition
● Function declaration,function definition, function calling (syntax and ex)
● Ex program
2. Function prototype
● Definition
● List
● Explain each prototype with example program
3. Recursive function
● Definition
● Structure
● Explain
● Ex program
4. Passing parameters
● Call by value
➔ Definition
➔ Explain the process
➔ Ex program
● Call by Reference
➔ Definition
➔ Explain the process
➔ Ex program
5. Programs
➔ Factorial using recursive function
➔ Swapping two numbers (call by value and call by reference)
Unit 4
1. Structure
● Definition
● Syntax
● Example
● Draw structure and explain briefly
● Example program
2. Array of structure
● Definition
● Syntax
● Example
● Draw structure and explain briefly
● Example program
3. Nested structure
● Definition
● Syntax
● Example
● Draw structure and explain briefly
● Example program
4. Pointer structure
● Definition
● Syntax
● Example
● Draw structure and explain briefly
● Example program
5. Singly linked List
● Definition
● Draw the structure and explain
● List of operations
● Explain each operations with diagram
6. Dynamic memory allocation
● Definition
● List of memory allocations
● Explain each types with syntax and example
7. Programs
➢ Student details
➢ Employee payroll
➢ Singly linked list operations
Unit 5