SlideShare a Scribd company logo
ARRAYS
ARRAYS
Arrays are collection of data that belong to similar
data type
Arrays are collection of homogeneous data
Array elements can be accessed by its position in the
array called as index
Arrays(Contd.)
Array index starts with zero
The last index in an array is num – 1 where num is the no
of elements in a array
int a[5] is an array that stores 5 integers
a[0] is the first element where as a[4] is the fifth element
We can also have arrays with more than one dimension
float a[5][5] is a two dimensional array. It can store 5x5 =
25 floating point numbers
The bounds are a[0][0] to a[4][4]
String functions
strlen(str) – To find length of string str
strrev(str) – Reverses the string str as rts
strcat(str1,str2) – Appends str2 to str1 and returns
str1
strcpy(st1,st2) – copies the content of st2 to st1
strcmp(s1,s2) – Compares the two string s1 and s2
strcmpi(s1,s2) – Case insensitive comparison of
strings

More Related Content

PPTX
Hash table in data structure and algorithm
PPT
DATASTRUCTURES UNIT-1
PDF
Application of hashing in better alg design tanmay
PPTX
Hash tables
PPT
Hashing
PPT
Data Structure and Algorithms Hashing
PPT
Hashing
PPTX
Hashing algorithms and its uses
Hash table in data structure and algorithm
DATASTRUCTURES UNIT-1
Application of hashing in better alg design tanmay
Hash tables
Hashing
Data Structure and Algorithms Hashing
Hashing
Hashing algorithms and its uses

What's hot (20)

PPTX
Hashing Technique In Data Structures
PPT
Hash table
PPT
Hashing PPT
PPT
Hash tables
PPTX
Hash table
PPS
Ds 8
PPT
Data structures
PDF
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
PPTX
Hashing 1
PPTX
linear probing
PPTX
Hashing in datastructure
PPT
Hashing
PDF
Hashing Algorithm
PPT
Hashing
PPTX
PROLOG: Matching And Proof Search In Prolog
PPT
358 33 powerpoint-slides_15-hashing-collision_chapter-15
PPTX
Hashing
PPTX
Rehashing
PPTX
Data structure and its types
Hashing Technique In Data Structures
Hash table
Hashing PPT
Hash tables
Hash table
Ds 8
Data structures
Hashing notes data structures (HASHING AND HASH FUNCTIONS)
Hashing 1
linear probing
Hashing in datastructure
Hashing
Hashing Algorithm
Hashing
PROLOG: Matching And Proof Search In Prolog
358 33 powerpoint-slides_15-hashing-collision_chapter-15
Hashing
Rehashing
Data structure and its types
Ad

Viewers also liked (9)

PPTX
2.5.1 library of functions
PDF
String Dan Array
PPTX
Array and string
PPT
Array Presentation (EngineerBaBu.com)
PPT
PPTX
Array in c language
PDF
Effective presentation skills
PPSX
C Programming : Arrays
PPTX
Array in C
2.5.1 library of functions
String Dan Array
Array and string
Array Presentation (EngineerBaBu.com)
Array in c language
Effective presentation skills
C Programming : Arrays
Array in C
Ad

Similar to Array & string (20)

PPTX
ARRAY
PDF
Numpy
PDF
PPTX
Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT
PPT
Strings Arrays
PPTX
PPTX
U2.pptx Advanced Data Structures and Algorithms
PDF
Homework Assignment – Array Technical DocumentWrite a technical .pdf
PPT
PPTX
Array in c
PDF
Anton Kasyanov, Introduction to Python, Lecture4
PDF
arrays-130116232821-phpapp02.pdf
PPTX
A singly linked list is a linear data structure
PDF
Arrays in python
PPTX
Arrays_and_Strings_in_C_Programming.pptx
PPTX
unit 2.pptx
PPTX
Arrays in Data Structure and Algorithm
PDF
cluod.pdf
PDF
Unit 2
ARRAY
Numpy
Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT
Strings Arrays
U2.pptx Advanced Data Structures and Algorithms
Homework Assignment – Array Technical DocumentWrite a technical .pdf
Array in c
Anton Kasyanov, Introduction to Python, Lecture4
arrays-130116232821-phpapp02.pdf
A singly linked list is a linear data structure
Arrays in python
Arrays_and_Strings_in_C_Programming.pptx
unit 2.pptx
Arrays in Data Structure and Algorithm
cluod.pdf
Unit 2

More from Prabhu Govind (20)

PPT
Preprocessor in C
PPT
Memory allocation in c
PPT
File in c
PPT
Pointers in C
PPT
Unions in c
PPT
Structure in c
PPT
Recursive For S-Teacher
PPT
User defined Functions in C
PPT
Pre defined Functions in C
PPT
Looping in C
PPT
Branching in C
PPT
Types of operators in C
PPT
Operators in C
PPT
Statements in C
PPT
Data types in C
PPT
Constants in C
PPT
Variables_c
PPT
Tokens_C
PDF
Computer basics
PDF
Computer fundamentals
Preprocessor in C
Memory allocation in c
File in c
Pointers in C
Unions in c
Structure in c
Recursive For S-Teacher
User defined Functions in C
Pre defined Functions in C
Looping in C
Branching in C
Types of operators in C
Operators in C
Statements in C
Data types in C
Constants in C
Variables_c
Tokens_C
Computer basics
Computer fundamentals

Recently uploaded (20)

PPTX
Cell Types and Its function , kingdom of life
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Insiders guide to clinical Medicine.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Types and Its function , kingdom of life
STATICS OF THE RIGID BODIES Hibbelers.pdf
Institutional Correction lecture only . . .
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Final Presentation General Medicine 03-08-2024.pptx
Microbial disease of the cardiovascular and lymphatic systems
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Insiders guide to clinical Medicine.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O5-L3 Freight Transport Ops (International) V1.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pre independence Education in Inndia.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

Array & string

  • 2. ARRAYS Arrays are collection of data that belong to similar data type Arrays are collection of homogeneous data Array elements can be accessed by its position in the array called as index
  • 3. Arrays(Contd.) Array index starts with zero The last index in an array is num – 1 where num is the no of elements in a array int a[5] is an array that stores 5 integers a[0] is the first element where as a[4] is the fifth element We can also have arrays with more than one dimension float a[5][5] is a two dimensional array. It can store 5x5 = 25 floating point numbers The bounds are a[0][0] to a[4][4]
  • 4. String functions strlen(str) – To find length of string str strrev(str) – Reverses the string str as rts strcat(str1,str2) – Appends str2 to str1 and returns str1 strcpy(st1,st2) – copies the content of st2 to st1 strcmp(s1,s2) – Compares the two string s1 and s2 strcmpi(s1,s2) – Case insensitive comparison of strings

Editor's Notes

  • #5: Header file to be included is string.h