SlideShare a Scribd company logo
1 of 52
 C is Programming Language
 Developed at AT & T’s Bell Laboratory in 1972
 Designed and Written by Dennis Ritchie
 Replaced more familiar language like PL/I,
ALGOL etc.
 Reliable, Simple and easy to use.
 Nobody can learn directly C++/ Java directly
 C++, C# or JAVA make use of object oriented
programming to organize program
 Major parts of popular OS like windows, Linux
are still written in C
 Common consumer devices like microwave
ovens, washing machines and digital cameras
program part is written in C
 Some of 3D computer games
 VARIABLES
• Variables is entity that may change
• Variable is nothing but the name given to the
memory cell
 CONSTANTS
• Constant is an entity that doesn’t change
 KEYWORDS
• “Reserved Words”
• Keywords are the words whose meaning has
already been explained to the C Compiler
• Keywords cannot be used as variable names.
• 32 Keyword available in C.
 Constant can be declared in the way we declare
variable
 But during declaration value need to be
assigned to declared contant name. Its value
cannot be modifeid in the program
 In another way, Constant is nothing but the
value that we assign to variable.
 An integer constant must have atleast one digit
 It must not have decimal point
 It can be either positive or negative
 If no sign precedes an integer constant, it is assumed
to be positive
 No commas or blanks are allowed within an integer
constant
 The allowable range for integer constant is -32768
to 32767 (assuming 16bit Compiler)
 An integer constant must have atleast one digit
 It must have decimal point
 It can be either positive or negative
 Default sign is positive.
 No commas or blanks are allowed within an
integer constant
 The mantissa part and exponent part should be
separated by a letter e or E
 The mantissa part can be positive or negative
 Default sign for mantissa is positive
 The exponent part must have atleast one digit
which must be a positive or negative integer.
Default sign is positive
 Any single alphabet, single digit or a single
special symbol enclosed within single inverted
commas.
 Both inverted commas should point to left
 Variable name is any combination of 1 to 31
alphabets, digits or underscores.
 The first character in the variable name must be
an alphabet or underscore
 No commas or blanks are allowed within
variable name
 No special symbol other than an underscore
 C compiler expects from user to specify type of
variable user want to use in program
 This declaration is done at the beginning of
program
 Eg. int a, float akc, char code
 Different types of data allowed to be used in C
language
 Primary data types are
o Integer
o Float
o Character
 Some modifiers are allowed in C which gives
multiple sub class of data types
 Such modifiers are like long, short, signed,
unsigned, double, long double etc..
 Character occupies 1 byte memory location
 Example for character variable declaration
 Signed character (Range is -128 to 127)
 Unsigned character (Range is 0 to 255)
 Format specifier is %c.
For 16 bit compiler
2^16=65536
So Range is -32768 to +32767
For 32 bit compiler
2^32=4294967296
So range is -2147483648 to 2147483648
 Integer
 Long
 Short
 Unsigned
 Signed
For 16 bit compiler
Int a; (2byte)
a= 32800
Will not work as it is above 32767
long int a; (4byte)
a= 32800
Will work as it is falls in the range of -2147483648
to 2147483648
 Signed
 Unsigned
 Float occupies 4bytes in memory
-3.4e38 to +3.4e38 (6 digits after decimal point)
 Double occupies 8bytes in memory
-1.7e308 to +1.7e308 (12 digits after decimal point)
 Long double occupies 10bytes in memory
-1.7e4932 to +1.7e4932 (19 digits after decimal
point)
DATA TYPE SIZE RANGE FORMAT
SPECIFIER
int 4byte -2147483648 to 2147483647 %d
unsigned int 4byte 0 to 4294967296 %u
long int/long 4byte -2147483648 to 2147483647 %ld
unsigned long int 4byte 0 to 4294967296 %lu
long long int 8byte -9223372036854775808 To
-9223372036854775807
%lld
short int/short 2byte -32768 to 32767 %hd
unsigned short int 2 byte 0 to 65535 %hu
float 4byte -3.4e38 to 3.4e38 %f
double 8byte -1.7e308 to 1.7e308 %lf
long double 12 byte -1.7e4932 to 1.7e4932 %Lf
char 1byte -128 to 127 %c
unsigned char 1byte 0 to 255 %c
 Assignment Operators
= is an assignment operator
• a=15
• a=b=c=15
• a+=15
 Auto Increment/ Decrement Operators
These operators are ‘++’, ‘--’,
• The operator ++ adds 1
• The operator –– subtracts 1
• Two types: Prefix and Postfix auto
increment/decrement
• Prefix a=5 b=5
b=++a
After Execution a=6 b=6
 Postfix
a=5 b=5
b=a++
After execution a=6 b=5
 + addition
 - subtraction
 * Multiplication
 / division
 % modulo
 ==
Checks if values of two operands are equal or not.
If yes then condition becomes true
 !=
Checks if values of two operands are equal or not.
If no then condition becomes true
 >
Checks value of left operand is more than right
operand. If yes then condition is true
 <
Checks whether right operand is more than left
operand. If yes then condition is true.
 >=
 <=
 AND &&
 OR ||
 NOT !
• AND and OR operators allow two or more
conditions to be combined in if statement.
• Not operator reverses the result of an
expression it operates on. The output is logical
value i.e. 0 or 1.
 AND &
 OR |
 1’s complement operator ~
 XOR operator ^
 Left shift operator <<
 Right shift operator >>
 Also called as Ternary Operator (?:)
Max=a>b?a:b
 One Expression may contain different
operators
 Precedence means the order in which the
operations are carried out for given
expression.
 Associativity comes into picture when
operators of same priority comes into
expression.
Hierarchy of Operators
! Logical Not
* / %
Arithmetic and
modulus
+ - Arithmetic
< > <=
>= Relational
== != Relational
&& Logical AND
|| Logical OR
= Assignment
printf(“Text to printed on output screen”);
e.g. printf(“WELCOME to DKTE”);
printf(“Text with format specifier”, variable list);
e.g. printf(“year is %d”, y);
printf(“Text with format specifier”, expression);
e.g. printf(“addition is %d”, a+4);
 scanf(“format specifier”, list of variable address);
 E.g
scanf(“%d”,&a);
scanf(“%c”,&d);
if (condition/expression)
{ statement1;
stetement2;
……..
}
 If only one statement present, then there is no
need of curly bracket. But though they are
present there won’t be an error.
if (condition/expression)
{ statement1;
statement2;
…….
}
else
{
Statement1;
Statement2;
….
}
if(condition/expression)
{ statement1;
……. }
elseif(condition/expression)
{ statement1;
…….}
elseif(condition/expression)
{statement1;
……}
If (condition)
{
if (condition)
{
statement1;
….
}
else
{
statement1
…..
}
else
{
Statement1
……
}
Syntax
while(condition)
{
statement1;
statement2;
………
}
 Syntax
do
{ statement1;
Statement2;……………………
} while(condition);
 Syntax
for (initial counter; test counter; increment counter)
{
statement1;
statement2;….
}
switch(integer expression)
{
case constant1:
statement;
case constant2:
statement;
case constant3:
statement;
default:
statement;
}
switch(integer expression)
{
case constant1:
statement;
break;
case constant2:
statement;
break;
case constant3:
statement;
break;
default:
statement;
}
 Array is a collective name given to group of
memory location containing similar data types.
 Array is a collection of similar elements.
 Similar elements could be all int, or all float or
all char, etc.
 Array of character is called as ‘string’.
int marks[30]
int salary[6]= {24,45,56,56,56,76}
int salary[]= {24,45,56,56,56,76}

More Related Content

What's hot

constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
Sahithi Naraparaju
 
C++
C++C++
C++
k v
 

What's hot (19)

constants, variables and datatypes in C
constants, variables and datatypes in Cconstants, variables and datatypes in C
constants, variables and datatypes in C
 
FUNDAMENTAL OF C
FUNDAMENTAL OF CFUNDAMENTAL OF C
FUNDAMENTAL OF C
 
C Sharp Nagina (1)
C Sharp Nagina (1)C Sharp Nagina (1)
C Sharp Nagina (1)
 
Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
 
C presentation book
C presentation bookC presentation book
C presentation book
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
C++
C++C++
C++
 
Constant and variacles in c
Constant   and variacles in cConstant   and variacles in c
Constant and variacles in c
 
Data type
Data typeData type
Data type
 
Constants and variables in c programming
Constants and variables in c programmingConstants and variables in c programming
Constants and variables in c programming
 
C++
C++C++
C++
 
Datatype in c++ unit 3 -topic 2
Datatype in c++ unit 3 -topic 2Datatype in c++ unit 3 -topic 2
Datatype in c++ unit 3 -topic 2
 
C programming Ms. Pranoti Doke
C programming Ms. Pranoti DokeC programming Ms. Pranoti Doke
C programming Ms. Pranoti Doke
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
Lexical Analysis - Compiler design
Lexical Analysis - Compiler design Lexical Analysis - Compiler design
Lexical Analysis - Compiler design
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Computational model language and grammar bnf
Computational model language and grammar bnfComputational model language and grammar bnf
Computational model language and grammar bnf
 
Mesics lecture 3 c – constants and variables
Mesics lecture 3   c – constants and variablesMesics lecture 3   c – constants and variables
Mesics lecture 3 c – constants and variables
 

Similar to Introduction to c

Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
Sachin Verma
 
introductory concepts
introductory conceptsintroductory concepts
introductory concepts
Walepak Ubi
 

Similar to Introduction to c (20)

M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
 
C language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C languageC language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C language
 
C program
C programC program
C program
 
C programming language
C programming languageC programming language
C programming language
 
Module 1:Introduction
Module 1:IntroductionModule 1:Introduction
Module 1:Introduction
 
Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
C_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxC_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptx
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
introductory concepts
introductory conceptsintroductory concepts
introductory concepts
 
Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptx
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
C
CC
C
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
C language for Semester Exams for Engineers
C language for Semester Exams for Engineers C language for Semester Exams for Engineers
C language for Semester Exams for Engineers
 
Basic Of C language
Basic Of C languageBasic Of C language
Basic Of C language
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 

Introduction to c

  • 1.
  • 2.  C is Programming Language  Developed at AT & T’s Bell Laboratory in 1972  Designed and Written by Dennis Ritchie  Replaced more familiar language like PL/I, ALGOL etc.  Reliable, Simple and easy to use.
  • 3.  Nobody can learn directly C++/ Java directly  C++, C# or JAVA make use of object oriented programming to organize program  Major parts of popular OS like windows, Linux are still written in C  Common consumer devices like microwave ovens, washing machines and digital cameras program part is written in C  Some of 3D computer games
  • 4.
  • 5.
  • 6.  VARIABLES • Variables is entity that may change • Variable is nothing but the name given to the memory cell  CONSTANTS • Constant is an entity that doesn’t change
  • 7.  KEYWORDS • “Reserved Words” • Keywords are the words whose meaning has already been explained to the C Compiler • Keywords cannot be used as variable names. • 32 Keyword available in C.
  • 8.
  • 9.  Constant can be declared in the way we declare variable  But during declaration value need to be assigned to declared contant name. Its value cannot be modifeid in the program  In another way, Constant is nothing but the value that we assign to variable.
  • 10.
  • 11.  An integer constant must have atleast one digit  It must not have decimal point  It can be either positive or negative  If no sign precedes an integer constant, it is assumed to be positive  No commas or blanks are allowed within an integer constant  The allowable range for integer constant is -32768 to 32767 (assuming 16bit Compiler)
  • 12.  An integer constant must have atleast one digit  It must have decimal point  It can be either positive or negative  Default sign is positive.  No commas or blanks are allowed within an integer constant
  • 13.  The mantissa part and exponent part should be separated by a letter e or E  The mantissa part can be positive or negative  Default sign for mantissa is positive  The exponent part must have atleast one digit which must be a positive or negative integer. Default sign is positive
  • 14.  Any single alphabet, single digit or a single special symbol enclosed within single inverted commas.  Both inverted commas should point to left
  • 15.  Variable name is any combination of 1 to 31 alphabets, digits or underscores.  The first character in the variable name must be an alphabet or underscore  No commas or blanks are allowed within variable name  No special symbol other than an underscore
  • 16.  C compiler expects from user to specify type of variable user want to use in program  This declaration is done at the beginning of program  Eg. int a, float akc, char code
  • 17.  Different types of data allowed to be used in C language  Primary data types are o Integer o Float o Character  Some modifiers are allowed in C which gives multiple sub class of data types  Such modifiers are like long, short, signed, unsigned, double, long double etc..
  • 18.  Character occupies 1 byte memory location  Example for character variable declaration  Signed character (Range is -128 to 127)  Unsigned character (Range is 0 to 255)  Format specifier is %c.
  • 19. For 16 bit compiler 2^16=65536 So Range is -32768 to +32767 For 32 bit compiler 2^32=4294967296 So range is -2147483648 to 2147483648
  • 20.  Integer  Long  Short  Unsigned  Signed For 16 bit compiler Int a; (2byte) a= 32800 Will not work as it is above 32767
  • 21. long int a; (4byte) a= 32800 Will work as it is falls in the range of -2147483648 to 2147483648
  • 23.  Float occupies 4bytes in memory -3.4e38 to +3.4e38 (6 digits after decimal point)  Double occupies 8bytes in memory -1.7e308 to +1.7e308 (12 digits after decimal point)  Long double occupies 10bytes in memory -1.7e4932 to +1.7e4932 (19 digits after decimal point)
  • 24. DATA TYPE SIZE RANGE FORMAT SPECIFIER int 4byte -2147483648 to 2147483647 %d unsigned int 4byte 0 to 4294967296 %u long int/long 4byte -2147483648 to 2147483647 %ld unsigned long int 4byte 0 to 4294967296 %lu long long int 8byte -9223372036854775808 To -9223372036854775807 %lld short int/short 2byte -32768 to 32767 %hd unsigned short int 2 byte 0 to 65535 %hu float 4byte -3.4e38 to 3.4e38 %f double 8byte -1.7e308 to 1.7e308 %lf long double 12 byte -1.7e4932 to 1.7e4932 %Lf char 1byte -128 to 127 %c unsigned char 1byte 0 to 255 %c
  • 25.  Assignment Operators = is an assignment operator • a=15 • a=b=c=15 • a+=15
  • 26.  Auto Increment/ Decrement Operators These operators are ‘++’, ‘--’, • The operator ++ adds 1 • The operator –– subtracts 1 • Two types: Prefix and Postfix auto increment/decrement • Prefix a=5 b=5 b=++a After Execution a=6 b=6
  • 27.  Postfix a=5 b=5 b=a++ After execution a=6 b=5
  • 28.  + addition  - subtraction  * Multiplication  / division  % modulo
  • 29.  == Checks if values of two operands are equal or not. If yes then condition becomes true  != Checks if values of two operands are equal or not. If no then condition becomes true  > Checks value of left operand is more than right operand. If yes then condition is true
  • 30.  < Checks whether right operand is more than left operand. If yes then condition is true.  >=  <=
  • 31.  AND &&  OR ||  NOT ! • AND and OR operators allow two or more conditions to be combined in if statement. • Not operator reverses the result of an expression it operates on. The output is logical value i.e. 0 or 1.
  • 32.  AND &  OR |  1’s complement operator ~  XOR operator ^  Left shift operator <<  Right shift operator >>
  • 33.  Also called as Ternary Operator (?:) Max=a>b?a:b
  • 34.  One Expression may contain different operators  Precedence means the order in which the operations are carried out for given expression.  Associativity comes into picture when operators of same priority comes into expression.
  • 35. Hierarchy of Operators ! Logical Not * / % Arithmetic and modulus + - Arithmetic < > <= >= Relational == != Relational && Logical AND || Logical OR = Assignment
  • 36. printf(“Text to printed on output screen”); e.g. printf(“WELCOME to DKTE”); printf(“Text with format specifier”, variable list); e.g. printf(“year is %d”, y); printf(“Text with format specifier”, expression); e.g. printf(“addition is %d”, a+4);
  • 37.  scanf(“format specifier”, list of variable address);  E.g scanf(“%d”,&a); scanf(“%c”,&d);
  • 38.
  • 39.
  • 40. if (condition/expression) { statement1; stetement2; …….. }  If only one statement present, then there is no need of curly bracket. But though they are present there won’t be an error.
  • 42. if(condition/expression) { statement1; ……. } elseif(condition/expression) { statement1; …….} elseif(condition/expression) {statement1; ……}
  • 44.
  • 47.  Syntax for (initial counter; test counter; increment counter) { statement1; statement2;…. }
  • 48. switch(integer expression) { case constant1: statement; case constant2: statement; case constant3: statement; default: statement; }
  • 49. switch(integer expression) { case constant1: statement; break; case constant2: statement; break; case constant3: statement; break; default: statement; }
  • 50.
  • 51.  Array is a collective name given to group of memory location containing similar data types.  Array is a collection of similar elements.  Similar elements could be all int, or all float or all char, etc.  Array of character is called as ‘string’.
  • 52. int marks[30] int salary[6]= {24,45,56,56,56,76} int salary[]= {24,45,56,56,56,76}

Editor's Notes

  1. Ult