C Programming Material
C Programming Material
These are fundamental data types in Cnamely integer(int), floating(float), charater(char) and void.
Derived data types
Derived data types are like arays, functions, stuctures and pointers. These are dicussed in detal later.
void
Character Integer Float
int
Signed int double
char
short int
ghort int
Ungigned long double
char long int
-long int
Integer type
itegers are used to store whole numbers.
Floating type
Floating types are used to store real numbers.
Size and range of lInteger type on 16-bit machine
Type
Size(bytes) Range
Float 4
3.4E-38 to 3.4E+38
double 8
1.7E-308 to 1.7E+308
long double 10
3.4E-4932 to 1.1E+4932
Character type
Character types are used to store characters value.
Size and range of Integer type on 16-bit machine
void type void type means no value. This is usually used tospecify the type of
functions.
Character set of C
character: Itdenotes any alphabet, digit or special symbol used to represent information.
Use: These characters can be combined to form variables, C uses constants,
Variables, operators, keywords and expressions as building blocks to forma
basic C program.
Character set:- The character set is the fundamental raw material of any language and they are
used to represent information. Like natural languages, computer
language will also have well defined character set, which is useful to build the programs.
2. Executioncharacter set
Escape Sequence
ALPHABETS
Uppercase letters A-Z
Lowercase letters a-z
WHITESPACE CHARACTERS
vertical tab
horizontal tab Iv
b blank space new line
carriage return form feed \n
Double quote 12
Back slash Single quote
Question mark Null Alarm (bell)
Certain ASCIl characters are unprintable, which means they are not displayed on the screen or
printer. Those characters perform other functions aside from displaying text. Examples are
backspacing, moving to a newline, or ringing a bell.
They are used in output statements. Escape sequence usually consists of a backslash and a letter
or a combination of digits. An escape sequence is considered as a single character but a valid
character constant.
These areemployed at the time of execution of the program. Execution characters set are always
represented by a backslash () followed by a character. Note that each one of character constants
represents one character, although they consist of two characters. These characters combinations
are called as escape sequen ce.
Tactio
PSG
COLLEGE OF TECHNOLOGY
DEPARTMENT OF COMPUTER APPLICATIONS
BE
ELECTRONICS AND COMMUNICATION ENGINEERING - (G1& G2) Semester I
CONTINUOUS ASSESSMENT TEST I Date:07.11.2023
INSTRUCTIONS:
1. Answer ALLquestions. Each Question carries 25 marks.
2. In each question, Subdivision a) carries 5marks(one mark for eachcarries
question).
10 marks each.
Subdivision b(i) and b(in) carries 5 marks each and subdivision c)
Answer any ONE question from Subdivision c
3. Course Outcome Table :
Qn 1 Qn 2
CO1 CO2
(5x1=5 Marks)
CO1:
guestion number and write answer alphabet
la.For question numbers I to II,mention the
of your choice in answer sheet.
understood by the cormputer?
i. Which of the following is a low level language
MATLAB D)Assembly language
A) Interpreted language B) Middle language C)
iü. For the flowchart given below predict the output
Strt
while
|<20
A) 10 B) 2 C) 20 D) 0
Reed Lengh/Step 1
Roed BroStop 2
Area Length x Brondh/Slop 3
Prirt
Siep 4
Area
(2 x5=10 Marks)
1b. Answer both the questions:
algorithm. Write an algorithrn to find power of a given
i. List the characteristics to be satisfied by an
number
print the factorial of a given nurmber.
ii. State the purpose of flowchart. Draw flowchart to (1x 10 =10 Marks)
n Wntea program to ind the sum of allèven numbers îom 1toN where the value of Nis taken
as input.
90kenoas05: S ascil -d
8 NUL 16 DLE 48 0 64 a 8 P 96
32 12 p
1SOH 17 DC1 33!49 1 65 A 81 Q97 a 113 q
2STX 18 DC2 34 50 2 66 B 8282 R
M
R 98 b. 114 r
3ETX 19 DC3. 35 # 51
5133 67
67 C
C 83S99 c 115 s
4EOT 28
20 DC4
36 $ 52 4 68 D 84 T 100 d 116 t
SENQ 21 NAK 37 % 53 5 69E 85 U 101 e 117 u
6ACK 22 SYN 38&54670. F 86 V 102 f118 v
7BEL 23 ETB. 39 55 7 716 87 W 183 g 119 w
8 BS 24 CAN 40 56 8 72 H 88 X 184 h 120 x
9 HT 25 EM 41) 579 73 I 89 Y 105 i 121y
18 LF 26 SUB 42 58 : 74J90 Z 186 j 122 z
11 VT 27 ESC 59 75 K 91 [ 107 k 123 4
12FF 28 FS 44 60<76 L 92 198 1 124
13 CR 29 65 45 61 =77 M 93 ] 19 25}
14 S0 30 RS 46. 678. N 94 118 n 126
15 SI 31 US 47 / 639 790 95 11 o 127 DEL