0% found this document useful (0 votes)
59 views5 pages

C Program Lab

This document defines key computer programming concepts including programs, programming languages, hardware components, data types, variables, functions, loops, and input/output functions. It provides information on who invented the C programming language, common input/output devices, memory types, operating systems, and data storage formats. It also defines fundamental programming concepts such as variables, data types, comments, preprocessor directives, and loops.

Uploaded by

sabika afrin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views5 pages

C Program Lab

This document defines key computer programming concepts including programs, programming languages, hardware components, data types, variables, functions, loops, and input/output functions. It provides information on who invented the C programming language, common input/output devices, memory types, operating systems, and data storage formats. It also defines fundamental programming concepts such as variables, data types, comments, preprocessor directives, and loops.

Uploaded by

sabika afrin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

 What is Program: set of commands,instruction

 C program inventor: Dennis Ricci in 1972


 Book writter : E.Balagurusamy
 ANSI: American National Standard Institute
 ASCII: American Standard Code For Information Intercharge
 ASCII code value: A=65,B=66,a=97,b=98
 RAM : Random Access Memory
 ROM : Read Only Memory
 Mouse,Keyboard,Scanner,Pendrive
Input device :
 : Printer,Monitor,Speaker,Projector
 Output device
Which device are connected with Motherboard: RAM,AGP,CPU,IDE,Processor
 Operating system : Microsoft Windows,Apple,MAC,Linux,Android
 Binary: 0,1
 Kind Of Monitor: 2
1.CRT(Cathode Ray Tube) 2.LED(Light Emitting Diode)
LCD(Liquid Crystal Display)
 CD: Compact Disc
 DVD: Digital Versatile Disc
 IDE: Integrated Drive Electronics
 AGP : Accelerated Graphics Port
 CPU: Central Processing Unit
 8 Bit :1 Byte
 Operator:

 Fibonacci number: next number of the sum of previous two numbers.


The 1st two numbers of Fibonacci series are 0,1
Example:0,1,1,2,3,5,8,13
 Do …while loop:

 Main Function: 6

1. main() 2.int 3.int main(void) 4.void main() 5.main(void) 6.void main(void)


main()
Void means the function doesnot return any information

Int means the function returns integer value

 Data type: 4
int 4 byte 32 bit %d Integer type value
float 4 byte 32 bit %f decimal
double 8 byte 64 bit %lf
char 1 byte 8 bit %c character
 Variable: data name that store data value
1.letter,digit,underscore(_)
2.begin with letter(length 31
character)
 Declaration does 2 things:
1. tells compiler
variable name
2. data type that
variable hold
 Global variable: declared before the main
function
1.Keywords (int,float,void,while,else,if,switch,return)
 Local Variable: declared
2.Identifier inside the main
(amount)--name of a variable
function
3.constant (-15.5,100)
 C token:
4.strings (abc)
5.operators (+-*/)
6.special symbols ( {}, [] )
 Comment: /*…………………..*/
 #include<math.h> : mathematical function(cos,sin,pow,sqrt)
 #define : a symbolic constant (preprocessor directive)
#define x 52
#define PI 3.1416
 #include<conio.h> : console input output (getchar,putchar,clrscr)
Reading a single character function: getchar()
 %c : read single character
%s : read string
 Loop : 3
for Initialization;test condition;increment Pre-test loop
while Entry control loop Pre-test loop
Do…while Exit control loop Post-test loop

 Name print 10 times:


 Reverse digit:

You might also like