You are on page 1of 5

CE0002L

(Computer Fundamentals and Programming)

SUMMATIVE

4
Introduction to C Language

John Henry A. Escoto Mr. Abraham Magpantay


Oct. 05, 2020 Oct. 05, 2020
I. OBJECTIVES

At the end of this exercise, students must be able to:

a) Understand basic concept in C


b) Know how to display using C

II. BACKGROUND INFORMATION

The C language has been used successfully for every type of programming problem imaginable
from operating systems to spreadsheets to expert systems -and efficient compilers are available
for machines ranging in power from the Apple Macintosh to the Cray supercomputers.

The printf function in C does what its name suggest it does: it prints, on the screen, whatever you
tell it to. The “\n” is a special symbol that forces a new line on the screen. And “\t” for tab.

III. PROCEDURES

Write a program that will give the following output:


Answer the following questions:
1. What is the use of printf?
Its use in C programming language to make the output of character, string, float,
and integer values on the screen.

2. What does the special character ‘\n’ do?


Its use is to signify a newline character in C programming. In simple words, it’s
like “enter” in the normal keyboard which brings you to the new line under the previous one.

3. What does the special character ‘\t’ do?


Its use is to denote a tab space to print the variables one after the other. It is like
the “tab” key in the keyboard.

4. Give other special characters that may be use in printf function.


The other special characters in printf function are:
 alert - \a
 backslash - \\
 backspace - \b
 carriage return - \r
 double quote - \"
 formfeed - \f
 null character - \0
 single quote - \'
 vertical tab - \v
 question mark - \?.

IV. ASSESSMENT

Department Computer Science Department


Subject Code CE0002L
Description Computer Fundamentals and Programming
Term/Academic Year 1 / 2020-2021

Topic Introduction to Programming


and Algorithm
Lab Summative 4
No.
Lab Summative Introduction to C Language
CLO 1
Note: The following rubrics/metrics will be used to grade students’ output in the Lab
Summative 4.
Criteria Descriptions Points
Correctness of the program The program should be able to display 30
the expected output.

Completeness of the answer to The questions should be answered 30


questions briefly and concise.

Uniqueness of the program The program should not be unique in 40


and use of the commands the way that it is not same as others in
the manner of using the given
functions

Total 100%

You might also like