Вы находитесь на странице: 1из 15

C PROGRAMMING WORKSHEET 2019

CHAPTER 1: Introduction to Computer and Programming

1. What exactly is a Computer?

..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................

2. Write a brief description for each of the following type of computer.

Name Description

I. Desktop

II. Laptop

III. Tablet

IV. Servers

3. State the relationship of data representation: Bit, Byte and Character.

_____Bits = 1 Byte = _____Character

1
C PROGRAMMING WORKSHEET 2019

4. Explain the function of ASCII.

ASCII: American __________________________________________________________

________________________________________________________________________
Functions of ASCII

A. ______________________________________________________________

B. ______________________________________________________________

5. Computer in Everyday Life : Education,Industry,Banking and Commerce

Education Banking
1. Students can use computer as references 1.
tool and browse information through
internet.
2.
2.

Commerce Industry
1. 1.

2. 2.

6. Explain how hardware is different from software.


.....................................................................................................................................

.....................................................................................................................................

2
C PROGRAMMING WORKSHEET 2019

7. List 4 examples of Computer Hardware and Software

HARDWARE SOFTWARE
 

 

 

 

8. Indentify the output devices used for text, graphics, audio and video

Device Name Text Audio Video Graphics

Monitor    

Printer

Speaker

Projector

9. Which output device would you recommend for the following task?

Description Output Devices


I. Producing a large number of Letters in high quality.

II. Listening to music with friends

III. Producing wage slips with carbon copies

3
C PROGRAMMING WORKSHEET 2019

10.State the units of Data is measurement

Term Abbreviation Approx.Size Index Power

A. Bit

B. Byte

C. KB

D. Megabyte

E. GB

F. Terabyte 240

11.Fill in the blanks.


The_______________ is the metal and plastic box that contains the
main______________ of the computer. It houses the ___________, Central
Processing Unit (________), _______________________ and more.

Computer cases come in different__________ and _________.


A __________ case lies flat on a desk, and the ____________ usually sits on top
of it. A ___________ case is tall and sits next the monitor or on the floor.
The__________of the case usually has an on/off switch and one or more
______________________.

12.What tool can teachers and parents download to help teach programming?

○ Icons ○ Processor
○ Programs ○ Modules
4
C PROGRAMMING WORKSHEET 2019

13. Explain the types and functions of primary storage [RAM and ROM] and
secondary storage [Magnetic Medium, Optical Medium and Flash Memory]

1. Primary storage located at_________________________________.

2. What is ROM?
__________ Only Memory: Memory whose contents can be accessed and
read but ______________ to be changed. The memory of a ROM is
____________________ which means the program and data will not
_______________.

Types of ROM
PROM

EPROM

EEPROM

3. What is RAM?
Random _______________ Memory: Memory whose process contents can
be _______________. The memory of a RAM is ________________ which
means the program data will be _______________.

14.What are 3 most common operating systems for personal computers? Mention
with os extension.

Operating System Name Extension Name


A.

B.

C.

5
C PROGRAMMING WORKSHEET 2019

CHAPTER 2: Fundamentals in C Programming Language

1. Brief Explain C programming language?

..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................

2. Summary of C Programming language History.

Summary
1 B Language Developed By

2 Operating System Developed in C

3
Developed at

4
Creator of Traditional C
5
Year

3. Fill in the Blanks[C Programming Language Timeline].

Programming Development Year Developed By


Language
1. AGLOL 1960
2. BCPL 1967
3. B Ken Thompson
4. Traditional C 1972
5. K & R C Brain Kernighan and Dennis Ritchie
6. ANSI C 1989
7. ANSI/ISO C ISO Committee

6
C PROGRAMMING WORKSHEET 2019

CHAPTER 3: Operators and Expressions

1. List of different types of operators in C.

OPERATORS
 

 

 

2. Briefly explain types of expression in C.

Type Explanation Example


Expression in which Operator is in between
Infix
Operands
+ab
Prefix
Expression in which Operator is written after
ab+
Operands

3. Explain the Arithmetic Operators in C

Operator Meaning Example


+ Addition Operator
- 20 – 10 = 10
Multiplication Operator 20 * 10 = 200
/ 20 / 10 = 2
% Modulo Operator

7
C PROGRAMMING WORKSHEET 2019

4. Explain the Logical Operators in C

Operator Name of the Operator

&&

||

6. Difference between R-Value Expression and L-Value Expression

R Value Expression L Value Expression

7. Briefly explain Post and Pre Increment and Decrement operator with example

8
C PROGRAMMING WORKSHEET 2019

CHAPTER 4: Input and Output Functions

1. List of different input and output functions in C

 

2. Mention two Different types of Console IO Functions

1.

2.

3. List of different Formatted and Unformatted Input/output Functions

Formatted Input/output Functions Unformatted Input/output Functions

1. 1.

2. 2.

3. 3.

9
C PROGRAMMING WORKSHEET 2019

4. List of different Formatted and Unformatted Input/output Functions

Formatted Input/output Functions Unformatted Input/output Functions

1. 1.

2. 2.

3. 3.

5. What is the use of printf () and scanf () functions?

..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................

6. Mention the different format specifier in C.

Data type Format Specifier


1 int

2 char

3
float
4
double
5
long int

10
C PROGRAMMING WORKSHEET 2019

7. Fill in the Blanks.

Slno Function Name Usage


1 gets()

2 puts()

3 putchar()

4 getchar()

5 isdigit()

6 toupper()

8. Briefly explain the character library functions.

1. isalpha () : _________________________________________________________

2. isupper () : _________________________________________________________

3. islower() : _________________________________________________________

4. tolower() : _________________________________________________________

5. isprint() : _________________________________________________________

9. Explain library functions in different header files

ctype.h
math.h
stdio.h
conio.h

11
C PROGRAMMING WORKSHEET 2019

CHAPTER 5: Control Structures and Loops

1. What are the different types of control statement in C.?

1.

2.

3.

2. List of different control statement?

Control Statements Examples


1.

1.Decision Making Statements 2.

3.
1.

2.Looping Control Statements 2.

3.
1.

3.Unconditional Control Statements 2.

3.

3. What is Decision making Statement? Give with example

..............................................................................................................................................
..............................................................................................................................................
..............................................................................................................................................

12
C PROGRAMMING WORKSHEET 2019

4. What is Loop? Why use loops in C Language.

5. To find the different as shown bellow.

Syntax Output Remarks

for (; ; ) No arguments

for (a=0; a< =20;) Infinite loop

for (a=0; a<=10; a++) “a” is increased from 0 to 10 curly


printf(“%d”, a) braces are not necessary default
scope of for loop is one statement
after loop.

for (a=10; a>=0; a--) Displays value


printf(“%d”, a); from 10 to 0

6. What is switch and case statement? Give with example

13
C PROGRAMMING WORKSHEET 2019

7. Briefly explain while and do-while statement with example.

While Loop Do while loop


Explanation : Explanation :

Flowchart: Flowchart:

Example: Example:

Remarks: Remarks:

14
C PROGRAMMING WORKSHEET 2019

8. Explain nested statement in C.Give with example

Nested if Nested while loop


Explanation: Explanation:

Example: Example:

Nested do while loop Nested for loop


Explanation: Explanation:

Example: Example:

9. Briefly explain unconditional statements in C.

break continue goto

15

Вам также может понравиться