0% found this document useful (0 votes)
1 views

cprogrammingNotes1

The document outlines the history and development of the C programming language, starting from Algol-60 in 1960 to its creation by Dennis Ritchie in 1972 at AT&T Bell Labs. It highlights the importance of C as a portable, flexible, and general-purpose programming language, detailing its character set, tokens, keywords, identifiers, constants, operators, and data types. The document also explains various operators and their functions within C programming, emphasizing its robust capabilities for system and application software development.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

cprogrammingNotes1

The document outlines the history and development of the C programming language, starting from Algol-60 in 1960 to its creation by Dennis Ritchie in 1972 at AT&T Bell Labs. It highlights the importance of C as a portable, flexible, and general-purpose programming language, detailing its character set, tokens, keywords, identifiers, constants, operators, and data types. The document also explains various operators and their functions within C programming, emphasizing its robust capabilities for system and application software development.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

History of C Language

The First Structured procedural Programming Language Developed by


Cambridge university in the year 1960,it known as Algol-60.ALGOL stands for
Algorithmic language, but it was too abstract and too general language. In the year
1963 Cambridge University developed language CPL.CPL stands for Combined
Programming Language. in year 1967 Martin Richards was Developed Language
BCPL at Cambridge university. BCPL stands for Basic Combined Programming
Language. it was used for writing System Software. BCPL was not so powerful. so
its failed. So that in year 1970 ken Thompson developed language B by using many
feature of BCPL at AT & T Bell lab USA .this language was machine dependent so
it had solved many specific problems.
In the 1972 Dennis Ritchie developed language C at AT & T bell lab
USA. It was combination of B and BCPL. Since it was developed with the UNIX
operating System, so that it is strongly associated with UNIX . It is general purpose,
powerful, portable, flexible, compiled, Structured Programming Language. It
combined the feature of high level language with the element of assembler.
Importance of C
1) It is portable Language
2) It is flexible Language
3) It is general purpose Programming Language.
4) It is robust Language whose rich set of built in function and operators can be
used to write any complex program.
5) The language is very well suited from writing both System software and
business Packages. we can also write compiler using C Language it .
6) We can also write Structured Programming using C Language .the C programs
also have the ability to extends it by using the functions.
Character Set of C
The Characters that can be used to form words, number and expression depends
on computer in which we use specific characters as shown:
1. Letters - A - Z, a - z
2. Digits - 0-9
3. Special Characters - ! #; etc
4. White spaces – tabs, Enter etc.

CProgramming Prof.Rajendra N.Motinge


Token in C language
Likes as all languages C language has its own rules and Grammar are known
as Syntax. These are used to form a program. Program is set of executable
instructions. The smallest individual unit in a program is known as Token. Token
can be divided into different basic categories are as below
1) Keywords
2) Identifiers
3) Constants
4) Operators
5) Strings
6) Special Symbols
The figure below shows Tokens Examples
Keywords Identifiers Constants Operators String Special
Symbols
int ,float a,b,num,x,y, 12,23.06 +,-,* ,/,% “pqr” {}
double,do hello -10.2,112 “hello” []
while
These Explain as below
1) Keywords:
I) A keyword is reserved word whose meaning cannot be changed by the
user. It cannot be used as name for program variable or other user
defined program function.
II) Keywords serve as basic building block for program design and
development.The Keywords in C language must written in lower case
and they have a standard predefined meaning in the c language.
III) C language Consist of 32 Keywords. List of Keyword in C language as
below
int signed switch enum sizeof for
float unsigned case void goto continue
double if default static typedef
char else break auto const
long do struct register volatile
short while union extern return

CProgramming Prof.Rajendra N.Motinge


2) Identifier
The Words other than keyword that are used in a C program to gives the name
for various program elements as variable function are known as identifier.
Rule for writing the identifier are as below
1) Identifier consists of alphabetic character, digits and underscore
2) First letter in the identifier does not start with digit.
3) Upper case and lower case letters are different
4) Keyword cannot be used as identifier
5) White spaces and special symbol except underscore are not allowed in an
identifier

3) Constants
Fixed values that do not change during the execution of a program.
Following chart shows types constants

Constants

Numeric Constants Character Constants

Integer Constants Real Constant Character Constant String Constants

1) Decimal Integer Constants


2) Octal Integer Constants
3) Hexadecimal Integer Constants

1) Integer Constant: An integer constant refers to sequence of digits.


these are three Kinds of integer constants as shown below
i) Decimal Integer constants
ii) Octal Integer Constants
iii) Hexadecimal Integer Constants
i) Decimal Integer Constants: it Consists of a set of digits 0 to 9
preceded by + or – sign spaces, commas and non digit characters
are not permitted between digits.
eg. 250 -31 45789

CProgramming Prof.Rajendra N.Motinge


ii) Octal Integer Constants: it consists of any combination from
digits from 0 to 7 beginning with O
eg. O25 O77 O567
iii) Hexadecimal integer Constants: it consist of 0 to 9 digit and
A to F or a to f letter refers to 10 to 15 decimal digits beginning
with OX or Ox
eg. Ox8C OXbcd
2) Real Constants : The quantities that are represented by numbers
containing fractional parts are called real or floating point constants.
eg 0.0034 -0.98 + 431.456
real number can also be represented by exponential notation.the general
form for exponential notation is
mantissa E/e exponent
the mantissa is either a real number expressed in decimal notation or an
integer.the exponent is an integer number with an optional plus or minus
sign.
eg 34.45E15 4.6e-6

3) Single character Constants:these constants are of a single character


may be an alphabet digit or special symbol that enclosed in a pairs of
single quotation marks
eg ‘5’ ‘x’ ‘A’ ‘@’

4) String Constants :these consists of sequence of characters that enclosed


between a pairs of double quotation marks
eg. “hello” “abc123”
in every string is terminated by \0 .it is null character that is
automatically added to the string by compiler it is also known as
backslash character constant.
Escape sequence characters:- the backslash character constant used in
front of character tells the compiler to escape from its regular behaviour
and perform the desired function. List of other such characters is as
below
\b - back space character constants
\n –new line character constant
\t – horizontal tab character constant.
\0 –null character constant
\r - carriage returns character constant

CProgramming Prof.Rajendra N.Motinge


The Constant in C program can be defined by two way .we can give the
variable a direct values that used as a constant throughout the program
eg. int x=5;
we can also defined a constant using the # define directive. This is
placed before the main function. The symbolic constants are generally
written in upper case and declared in the program .this statement does
not end with semicolon
eg. #define PI=3.14

4) Operator:
An operator defined as symbol that tells the computer to perform certain
mathematical or logical manipulation. The C programming has 8 type of
operator are as below
1) Arithmetic Operators
2) Relational Operators
3) Logical Operators
4) Assignment Operators
5) Unary Operators
6) Conditional Operators
7) Bitwise Operators
8) Special Operators
1) Arithmetic Operators:- Symbols which used to perform Arithmetical
operation likes as addition, subtraction , division ,multiplication there +,-,*
,/,% are known as arithmetic operator. These operators are used to
perform following three type of Arithmetic
i) Integer arithmetic:- operation performs on two whole number or
integers number is called as integer Arithmetic .it gives always
integer result. in integer division the fractional part is truncated .
int X=23 ,Y=5;
X + Y=28
X - Y=18
X*Y=115
X/Y= 4
X%Y=3
ii) Floating point arithmetic: Operation performs on two real number
or fractional numbers is called floating point arithmetic. it gives
always floating point result.
float X=14.0,Y=4.0
X+Y=18.0
CProgramming Prof.Rajendra N.Motinge
X+Y=10.0
X*Y=56.0
X/Y=3.50
iii) Mixed Mode Arithmetic: Operation performs on real number and
integer number is called Mixed Mode Arithmetic. it gives always
floating result.
int X=15; float Y=10.0;
X+Y=25.0
X-Y=5.0
X*Y=150.0
X/Y=1.5
2) Relational Operator:- the operator which use to compare two quantities
is called Relational operator or comparison operator. Its result always 0 or
1 ,if expression is true then result is 1 otherwise result is 0.there are six
kinds of relational operator
i) < less than
ii) > greater than
iii) <= less than equal to
iv) >= greater than equal to
v) == equal to
vi) != not equal to
Relational operator in C used in decision making statement and
looping statement.
3) Logical Operator:- when expression has more than one condition and we
want makes certain decision then we use operator is called Logical
Operator. C has 3 kinds of logical operators are as below
i) && (Logical And)
A B A&&B
0 0 0
0 1 0
1 0 0
1 1 1
A has first relational expression and B has second relational expression. When we
used AND operator between this two expression then it gives the result 1 or 0 if both
expression has result 1 then output is 1 otherwise any one expression has 0 then
result is 0.

CProgramming Prof.Rajendra N.Motinge


ii) || (Logical OR)
A B A||B
0 0 0
0 1 1
1 0 1
1 1 1

A has first relational expression and B has second relational expression. When we
used OR operator between this two expression then it gives the result 1 or 0 if any
one expression has result 1 then output is 1 otherwise both expression has 0 then
result is 0.
iii) ! (logical NOT)
A Y=!A
0 1
1 0
When we used not operator then if expression has result 0 then it shows 1 ,or
expression has result 1 then it shows 0.
4) Assignment Operators: it is the combination of Arithmetic operator and
equal sign. In case of assignment operator the left hand side must be a
variable but the right hand side can be an expression or any constant value
it also called short hand assignment operator following table describe it
Assignment operator Statement with short Statement with
hand assignment simple
assignment
+= a+=1 a=a+1
-= a-=1 a=a-1
*= a*=1 a=a*1
/= a/=1 a=a/1
%= a%=1 a=a%1
5) Unary Operator:-
C++ has two unary operator ++(increment) and –(decrement).both this operator can
be used as postfix and prefix. Postfix means it use after operant .prefix means it use
before operant .when we use increment operator then it add one in operant. we use
decrement operator it subtract one from operant.

Postfix prefix operation


a++ ++a a=a+1
a-- --a a=a-1

CProgramming Prof.Rajendra N.Motinge


6) Conditional Operator: conditional has three expression so that it is
called ternary operator .this three expression joined by ? and :
Syntax is as below
exp1 ? exp2:exp3;
where exp1 ,exp2,exp3 are expressions exp1 expression evaluate first its values
either true or false if value is true it get exp2 otherwise exp3
Following example illustrate it
int a,b,c;
a=20;
b=35;
c=a<b ? a:b;
in above example a has value 20 and b has value 35 when a<b this expression
evaluate then statement is true so that c assign a.
7) Bitwise Operator: Bitwise operator is use to perform bit to bit operation
with binary operator. C has 6 bitwise operators.
They are as below
i) & (bitwise And operator)
A = 110101
B = 110110
A&B= 110100

ii) | (bitwise Or operator)


A = 110101
B = 110110
A|B= 110111
iii) ^ (bitwise X-Or operator)
A = 110101
B = 110110
A^B = 000011
iv) ~ (bitwise not operator)
A = 110101
~A= 001010
v) <<(bitwise left shift operator)
A = 110101
A<<2
A=010100

CProgramming Prof.Rajendra N.Motinge


vi)>>(bitwise right Shift Operator)
A = 110101
A<<2
A=001101
8) Special Operator
C has special operator comma, sizeof(),*(pointer),&(address of) ,->
member section operator
i) Comma (,): comma is use to separate the variable or element of
program.
eg . int a,b,c;
ii) Sizeof(): the sizeof() is compiled time operator that returns the
numbers of bytes the operant occupies
int a,b;
b=sizeof(a);
o/p: b=2
iii) & (address of )and pointer (*) operator:
int *p ,a;
p=&a;

iv) (->)Member selection operator:


Struct student
{
Int rollno;
Char name;
}s;
Void main()
{
Int *p;
P=&s;
Clrscr();
Scanf(“%d”,&s.rollno);
Scanf(“%s”,s.name);
printf(“\nrollno=%d”,p->rollno);
printf(“\nname=%s”p->name);
getch();
}

CProgramming Prof.Rajendra N.Motinge


Data types in C
Data means information and Type means here format. Data Type means format of
information which are going to give the computer for the purpose of processing.
Basically Data type are used for storing the information in memory location.
Following chart gives categories of Data Type
Data Type

Fundamental Data type Derived Data Type User Defined Data Type

Numeric Data type Non Numeric Data Type

Integer Real char

int float double


C language Supported three kind of Data type
1) Fundamental Data type 2) Derived Data type 3) User Defined Data
type
1) Fundamental Data Type: it also known as primary data types. these are
build in data type that are supported by language which are already present in
the C language.
Fundamental Data type classified into two categories
A) Numeric Data type: numeric data type divide in two kind
i) Integer type ii) Floating point type
i) Integer Type:- integer are all positive and negative number without decimal
point. C has three kind of integer storage namely Short int, int, long int . short
integer requires half the space than normal integer and long integer required double
space than normal integer values. All of these data types have signed and unsigned
forms. signed number may be positive or negative some space consume for + or –
sign. Unsigned number always positive and consume all the bits for the magnitude
of the number.
ii) Floating point number: floating point number represents a real number with
decimal point. It has six digits of precision. Floating point number denoted by the
keyword float. it requires four bytes of storage space. when accuracy of floating
CProgramming Prof.Rajendra N.Motinge
point number is insufficient ,we can use double to define the number. it requires 8
bytes of storage space. it has 14 digits of precision. double is same as float but with
longer precision. To extends the precision further we can use long double. it
consumes 80 bits of memory space.
B) Non numeric data type: character is non numeric Data type it is declared
using keyword char .it allows storing single character it requires 1 byte
means 8bits storage space. it can be signed and unsigned

Data type Size Range


char or signed char 8 bits (1byte) -128 to 127
unsigned char 8 bits 0 to 255
int or signed int 16 bits(2bytes) -32,768 to 32,767
Unsigned int 16 bits 0 to 65535
Short int 8 bits -128 to 127
Long int 32 bits(4bytes) -2,147,483,648to
2,147,483,647
Unsigned long int 32 bits 0 to 4,294,967,295
float 32 bits 3.4*10-38 to3.4*1038
double 64 bits(8bytes) 1.7*10-308to1.7*10308
Long double 80 bits(10bytes) 3.4*10-4932 to1.1*104932
Following table shows details of primary data types

C) Void Type:
t is Specify the type of function. when function does not return any values
then we specify the return as void Moreover if there is empty parameter list for
function then it is specified as void.
2) Derived Data Types:-
The data type which has some characteristics of primary data type and some of
its own. so that it is also known as secondary data type.Secondary data types
are arrays, function, pointer etc.
3) User Defined data types:
This data type are completely defined by User .its characteristic defined by
user and it as that so that is known as user defined data type .user defined data
type are typedef , enum , structure, union etc
a) Typedef: the typedef feature of C Language allows the user to define an
identifier that would represent an existing data type. This user defined
identifier can be used to declare variable that type

CProgramming Prof.Rajendra N.Motinge


Syntax: typedef data_type identifier;
Where data_type is existing primary data type it may be int, float, char,
double.
Identifier is new variable name it follows rule as define for declaration of
identifier name.
For example
Typedef int Marks;
Marks m1,m2,m3;
In the above example Marks is identifier and it has type int and now we can
be used to declare variable as that type as shown in second line.
b) enum:
it is known as enumerated data type. syntax as below
enum identifier { value1,value2,value3,value4,…..valaue n};
where identifier is used to defined enumerated data type which can be used to
declare variable that has one of values given in brace.these value is known as
enumeration constants.After definition we can declare variable for this new type as
below
enum identifier v1,v2,v3…..vn;
enumerated variable v1,v2,…..vn can have only one values value1,value2….value n
compiler automatically assign the integer values from 0 to enumeration constants
follow example illustrate it
example enum day{Monday,Tuesday,Wednesday,Thursday};
enum day week;
week =Monday;

CProgramming Prof.Rajendra N.Motinge


Declaration of variable
variable is the place where we can store the data when we declare the variable
then it allocated the memory store the data. This declaration tells the compiler two
things. What is the name of variable and what type of data hold by variable. variable
follows the rule as identifier has in C programming.Variable separated by commas
and statement terminated by semicolon.
Eg. int a,b,c;
Type conversions
In C ,if the operator has different types of operands then lower type is promoted to
higher type this is known as type conversion type conversion can be performs by
two ways;
a) Implicit or automatic type conversion:
C automatically converts any intermediates values to proper type in this
way lower type automatically converted to higher type.
b) Explicit type conversion:
The process of local conversion is known as explicit conversion. it is
also known as type casting or casting a value
(Type name) expression;
Type name is any name of primary data type

CProgramming Prof.Rajendra N.Motinge


Input and Output Statements in C
Whenever user enter the data then the statement use to read those data is called input
statement. in c programming function use in that input statement to read the data is
called input statement .the statement used to display the data or information on the
screen is called output statement function use in that input statement to perform this
task is called output statement.C supports various input and output statement that are
categories into 2 type as formatted and unformatted input and output function .it
shown as below;

Input /output Function

Unformatted formatted
1.getchar() 1.scanf()
2.putchar() 2.printf()
3.getch()
4.getche()
5.gets()
6.puts()
A) unformatted function:
1. getchar()
This is simplest unformatted input function.it used to reading the single character
from standard input unit or device.this function does not require any argument.
Syntax
Character_variable =getchar();
Example
main()
{
Char ch;
ch=getchar();
printf(“%c”,ch);
}

CProgramming Prof.Rajendra N.Motinge


2.putchar()
This is simplest unformatted output function.it used to display the single character
to standard output unit or device or screen.this function require any argument as
character_variable which value we want to display on screen.
Syntax
putchar(character_variable);
Example
main()
{
Char ch;
ch= getchar();
putchar();
}
3.getch()
getch() is used to get a character from console but does not echo to the screen. getch
reads a single character directly from the keyboard, without echoing to the screen.
This function return the character read from the keyboard.
syntax
int getch(void);
Example
void main()
{

char ch;
ch = getch();
printf("Input Char Is :%c",ch);
}
Here,declare the variable ch as char data type, and then get a value
through getch() library function and store it in the variable ch.And then,print the
value of variable ch. During the program execution, a single character is get or read
through the getch(). The given value is not displayed on the screen and the compiler
does not wait for another character to be typed.And then,the given character is
printed through the printf function.

CProgramming Prof.Rajendra N.Motinge


4.getche()
getche() is used to get a character from console, and echoes to the screen.getche
reads a single character from the keyboard and echoes it to the current text window,
using direct video or BIOS.This function return the character read from the
keyboard.
Syntax
int getche(void);
Example
void main()
{

char ch;
ch = getche();
printf("Input Char Is :%c",ch);
}

Here,declare the variable ch as char data type, and then get a value
through getche()library function and store it in the variable ch.And then,print the
value of variable ch.During the program execution, a single character is get or read
through the getche(). The given value is displayed on the screen and the compiler
does not wait for another character to be typed. Then,after wards the character is
printed through the printf function.
5.gets()
The gets() is the function used to read sequence of character. It terminate only when
Enter is occurred .its syntax is as below
gets(variable_name);
where variable_name is any identifier that used to storing the string here no need to
format specifiers and address operator.
It illustrate by following example
main()
{
char name[10];
printf(“Enter the name”);
gets(name);
printf(“\nname=%s”,name);
CProgramming Prof.Rajendra N.Motinge
}

6.puts()
This is function also used to output the value of the string display on screen.this
function require one argument as variable_name which value we want to display on
screen.
Its syntax is as below
puts( variable_name);
it can be illustrate by following example
main()
{
Char name[10];
printf(“\nEnter the name”);
gets(name);
puts(name);
}
B) formatted function
1) printf()
This is the standard formatted output function.it is defined in the standard
input/output library.it is used to display or output the string that is given in double
quotes.
Syntax
printf(“string”);
or
printf(“control string”,arg1,arg2,….arg n);
where control string consists of following
a) sequence of characters to display
b) type specifier
c) Escape sequence characters
arg1,arg2…….arg n are arguments or variable whose value can be formatted.so as to
format the output

CProgramming Prof.Rajendra N.Motinge


2)scanf()
This is a standard formatted input function. this function is defined in the standard
input/output library .this function takes the values that is Entered by the user .the
scanf() does not accept the blank space and hence it terminates at the place at which
it finds the white space
Syntax:
Scanf(“type specifier”,&var1,&var2……$var n)
The & is operator is used to specify the address of var_name and stores the value
that is given by the user at location of var_name.
i)formatting integer:
syntax
%wd
Where w specifies minimum field width
Eg. printf(“%4d”,x);
Where x=4567
4 5 6 7
printf(“%8d”,x);
where x=4567
4 5 6 7
Positive number is right justify and negative number is left justify
Eg. printf(“%-8d”,x);
Where x=4567
4 5 6 7
Eg printf(“%08d”,x)
Where x=4567
0 0 0 0 4 5 6 7
Thus the blank spaces are filled with 0 if the number is larger than
width then width is ignored.
ii)formatting floating point
%wf

CProgramming Prof.Rajendra N.Motinge


Where w specifies minimum field width
X=12.345
printf(“%f”,x);
1 2 . 3 4 5 0 0
Eg. printf(“%2f”,x);
1 2 . 3 4

Eg.printf(“%9.2f”,x);
1 2 . 3 4

Eg.printf(“%-9.2f”,x);
1 2 . 3 4

iii)formatting character
%wc
Where w specifies minimum field width
Eg name=’x’;
printf(“%c”,name);
x
Eg name=’x’;
printf(“%4c”,name);
x
Eg name=’x’;
printf(“%-4c”,name);
x
iv)formatting string
the string can be formatted as the same way as character
%ws
Where w specify the width of string
Eg. name= “new delhi”
Printf(“%s”,name)
n e w d e l h i
Eg. name= “new delhi”
Printf(“%6s”,name)

CProgramming Prof.Rajendra N.Motinge


n e w d e

Structures of C program
The C language is known as the procedural language and hence it must be written
according to its structure and procedure. the structure of c program divide into 6
section it shown as below
Documentation section
Linking section
Global Declaration section
Function prototype section
main()
{
Declaration statement;
Executable section;
return statement;

}
Function definition section
Function header
{
Declaration statement;
Executable section;
return statement;

}
Each and every statement of c program terminated by semi colon(;) and is known as
delimiter. opening curly brace indicate start of body and Ending curly brace indicate
end of the body.
i)Documentation section:
this section contain un-executable statement. This section consist of statement that
never executed by compiler. It shows extra information about program like as author
of program. date of creation, title of program and other information about the code.
This comment can be write anywhere in the program .this section is not compulsory
.it can be write by two ways they are as below
1)Single line comments
It is start with //(double back slash) it makes that whole line as comment
Eg. //program for addition of two number
CProgramming Prof.Rajendra N.Motinge
2)Multi line comments
It start with /*(back slash and asterisk mark) and terminated by */(asterisk mark and
back slash) it makes many line between those as comments
Eg.
/* program for addition of two number
Date:-11/11/2008
Author:R.N.Motinge */
ii)Linking section
This section used to include header file which provide the instruction to compiler to
link the function used in program link with system library.#-pre-processor directive
sign use to write this section
Syntax is as below
#include<headerfile.h>
Where headerfile is name of library file that contain the required function definition.
this must be placed before the main section.
Most commonly used linking section
#include<stdio.h>
#include<conio.h>
Stdio.h contain the definition of standard input and output functionConio.h contain
the definition of console input and output function
iii)Global declaration section
This section is used to define variable which include symbolic constants which are
known as pre-processor directives. it does not terminated with semicolon.
Syntax
#define variable_name value
iv) Function prototype section
This section contain the format of user define function. it define the model of
function which later we define in program.it terminated with semicolon
Syntax is as below
Return_type function_name(list of argument);
v) main() function section
CProgramming Prof.Rajendra N.Motinge
this is compulsory section for all type of program.every program contain only one
main section.program execution start with section and finally return again main so
that main section contain three type of statement
1)declaration statement
2)executable statement
3)return statement
Every statement terminated by semicolon, declaration statement contain declaration
of data member with data type. executable statement contain input and output
statement, calculation part, function call etc. every function should return a value so
main section finally contain return statement .if main has no return then we use void
with main.
vi) Subprogram or function definition section
This is user define function. that can call in main section. This section contain
statement same as main section.When the program written by same as its structure
of program and it is ready we must compile and run c program. following diagram
shows process of compilation and running of C program

CProgramming Prof.Rajendra N.Motinge


Process of compilation of C Program.

System Ready

Program code Enter program

Edit source program

Compile source program

syntax

NO Object code

System library Link to system library


Executable code
Input data Execute Object code

Data error logical error

Error

No error
Correct output

stop

CProgramming Prof.Rajendra N.Motinge


Question bank
1.what are data types?gives detail description.
2.Explain the token in C program.
3.What are Operator? Explain the type of operator.
4.Explain structure of C program.
5.Explain the Data type in C program.
6.Explain the formatted and unformatted input and output function
7.write note on history of C.
8.write the characteristics of C program.
Programming assessment
1.Write a program in c for addition of two number.
2.write a program in c for calculate area of triangle,area of rectangle,area of circle.
3.write a program in c for calculate simple interest and total amount.
4.write a program in c for calculate the average and percentage of 5subject marks.
5.write a program in c for calculate root of quadratic equation.
6.write a program in c for calculate the area of triangle by herons formula.
7.write program in c for swapping the number.
8.write a program in c for convert the temperature Fahrenheit to Celsius
(C=5/9*F-32)
9.write a program in c for addition ,subtraction,multiplication,division of two
number.
10.write a program in c for find the largest number among two number.
(without if else)
11.write a program in c for find the largest number among three number.
(without if else)
12.write a program in c for find even or odd number(without if else)

CProgramming Prof.Rajendra N.Motinge

You might also like