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

CP Question Bank Unit 1 To 6

This document is a question bank for a first-year computer programming course, covering various topics in C programming. It includes questions on standard C program structure, data types, control statements, arrays, string handling, pointers, and file handling functions. Each unit contains multiple questions and programming tasks designed to assess understanding of the concepts.

Uploaded by

jadhaoshiv3012
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)
24 views2 pages

CP Question Bank Unit 1 To 6

This document is a question bank for a first-year computer programming course, covering various topics in C programming. It includes questions on standard C program structure, data types, control statements, arrays, string handling, pointers, and file handling functions. Each unit contains multiple questions and programming tasks designed to assess understanding of the concepts.

Uploaded by

jadhaoshiv3012
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/ 2

QUESTION BANK1

Sub: Computer Programming

Class: First Year

Unit 1

1) What are the various block of standard C program? Explain each with example.
2) Explain C program execution life cycle with neat block diagram.
3) What is keyword in C.
4) Explain the variable with example.
5) What is an escape sequences?
6) Explain C Tokens.
7) Define following terms: a)Variables b) Keywords c) Compiler
8) Explain different types of operator with example.
9) Explain increment and decrement operator with example.
10) Explain reading and writing character with example.
11) Explain various data types in C.
12) Explain the printf() and scanf() with example.

Unit 2

1) Explain if,if-else with example.


2) Write a C program to print sum of n nos (1 to n).
3) Explain switch case statement with example.
4) Differentiate between while and do-while statement.
5) Write program to print sum of square of first 20 odd no by using
a) for b) while c) do-while
6) Explain the following statement with example.
a) Braek b) continue c) goto d) return
7) Write a program to print following structure using for loop
**** b) * c) * * * *
**** * * * * *
**** * * * * *
* * * * *
* * * * *
Unit 3
1) What is mean by array? Explain single dimensional array with its advantage and example
2) Write a program to find largest and smallest number in an array of ten integer number.
3) What is two dimensional array and how it is declared and initialized ?
4) Write a program to calculate sum of all element of two dimensional array.
5) Write a c program to read 2×2 matrix & print its matrix addition.
6) Write a program to read 3×3 matrix and print it in matrix format.

Unit 4
1) Explain string handling function with example.
2) List and explain different library function for string manipulation with suitable example.
3) Write a program to count a character ‘a’ that appears in the string “aabbaa” for no of times.
4) Write a program to count a character ‘e’ that appears in the string =“Engineering” for no of
times.
5) Explain arithmetic operation on character with example.
6) Write program to count vowels in a string.

Unit-5
1) Explain pointers along with its uses.
2) Write a C program for factorial function which calculates factorial of N number.
3) What is a function in c? Explain with example call by value mechanism
4) Explain indirection operator ‘*’.and address of operator ‘&’ with suitable example.
5) Write a program to design function sum which calculate the addition of two integer nos.
6) What is pointer? What kind of information does the pointer variable represent? Explain
different uses of pointer.
7) Write a program to swap two integer number using pointers.
8) Explain pointer arithmetic with suitable example.
9) Explain the following with example. a)Pointer to pointer b) pointer to function

Unit-6

1) Define structure with example.


2) List and explain file handling functions.
3) Write a program to read data from keyboard write it to the file & read same data and
display on the screen.
4) Explain the following term with example
a) fprintf() b) fscanf() c) fopen()
5) Explain the following term with example
a) fread() b) fwrite() c) fgetc()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy