SlideShare ist ein Scribd-Unternehmen logo
1 von 26
NOTES
NOTES
NOTES
NOTES
#include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[10], i; 
clrscr(); 
printf(“Enter Array Elementn”); 
for(i=0;i<10;i++) 
{ 
scanf(“%d”, &arr[i]); 
} 
printf(“Array Elementn”); 
for(i=0;i<10;i++) 
{ 
printf(“%dn”,arr[i]); 
} 
getch(); 
} 
EXTRA
EXTRA
EXTRA
NOTES
EXTRA
EXTRA
#include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[100], s, i , j, temp; 
clrscr(); 
printf(“Enter Array Sizen”); 
scanf(“%d”,&s); 
printf(“Enter Array Elementn”); 
for(i=0;i<s;i++) 
{ 
scanf(“%d”, &arr[i]); 
} 
printf(“Array Element befor sortingn”); 
for(i=0;i<s;i++) 
{ 
printf(“%dn”, arr[i]); 
} 
EXTRA
for(i=0;i<s-1;i++) 
{ 
for(j=0;j<s-1-i;j++) 
{ 
if(arr[j]>arr[j+1]) 
{ 
temp=arr[j]; 
arr[j]=arr[j+1]; 
arr[j+1]=temp; 
} 
} 
} 
printf(“Data after sorting n”); 
for(i=0;i<s;i++) 
{ 
printf(“%dn”, arr[i]); 
} 
getch(); 
} 
EXTRA
EXTRA
#include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[100], s, i , j, temp; 
clrscr(); 
printf(“Enter Array Sizen”); 
sxcanf(“%d”,&s); 
printf(“Enter Array Elementn”); 
for(i=0;i<s;i++) 
{ 
scanf(“%d”, &arr[i]); 
} 
printf(“Array Element befor sortingn”); 
for(i=0;i<s;i++) 
{ 
printf(“%dn”, arr[i]); 
} 
EXTRA
for(i=0;i<s-1;i++) 
{ 
for(j=i+1;j<s;j++) 
{ 
if(arr[i]>arr[j]) 
{ 
temp=arr[i]; 
arr[i]=arr[j]; 
arr[j]=temp; 
} 
} 
} 
printf(“Data after sortingn”); 
for(i=0;i<s;i++) 
{ 
printf(“%dn”,arr[i]); 
} 
getch(); 
} 
EXTRA
EXTRA
EXTRA
#include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[10],s, p, temp,i,k; 
clrscr(); 
printf("enter Array Sizen"); 
scanf("%d",&s); 
printf("Enter Array Elementn"); 
for(i=0;i<s;i++) 
{ 
scanf("%d",&arr[i]); 
} 
printf("Array Elementn"); 
for(i=0;i<s;i++) 
{ 
printf("%dn",arr[i]); 
} 
EXTRA
for(i=1;i<s;i++) 
{ 
p=i-1; 
temp=arr[i]; 
while(temp<arr[p]&&p>=0) 
{ 
arr[p+1]=arr[p]; 
p--; 
} 
arr[p+1]=temp; 
} 
printf("Data after sortingn"); 
for(i=0;i<s;i++) 
{ 
printf("%dn",arr[i]); 
} 
getch(); 
} 
EXTRA
Searching 
Linear Search Binary Search 
EXTRA 
Linear Search- This is the simplest technique to find 
out an element in an unsorted list. 
In this technique the value of the key is compared with the 
first element of the list, if match is found then the search is 
terminated. Otherwise next element from the list is fetched 
and compared with the key and this process is continued till 
the key is found or list is completely.
EXTRA 
Binary Search- Binary search works for sorted lists and is a 
very efficient searching technique. It is used to find the 
location of a given element or record in a list. Other 
information associated with the element can also be 
fetched if required. To find the location of a file in the 
computer directory one can use this searching technique. 
Let low represents lower limit of the list l, high upper and 
mid is average of low and high that is middle of the lower 
and upper limits. 
Mid = (low+high)/2; 
we compare the middle element with key to be searched. If 
the value of middle element is greater than key ,then key 
will exit in lower half of the list, take high = mid-1 and find 
new value of mid.
#include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[100],s, i, first=0, mid=0, last =0, count =0, num; 
clrscr(); 
printf(“Enter Array Sizen”); 
scanf(“%d”,&s); 
printf(“Enter Array Elementn”); 
for(i=0;i<s;i++) 
{ 
scanf(“%d”,&arr[i]); 
} 
printf(“Array Elementn”); 
for(i=0;i<s;i++) 
{ 
printf(“%dn”,arr[i]); 
} 
EXTRA
printf(“Enter the no want to search n”); 
scanf(“%d”,&num); 
last = s-1; 
while((first<=last)&&(count==0)) 
{ 
mid=(first+last)/2; 
if(arr[i]==num) 
{ 
count=mid; 
} 
else if(arr[i]<num) 
{ 
first=mid+1; 
} 
else 
{ 
last=mid-1; 
} 
} 
EXTRA
if(count>0) 
{ 
printf(“No 
found”); 
} 
else 
{ 
printf(“No not found”); 
} 
getch(); 
} 
EXTRA
Double Dimension Array #include<stdio.h> 
#include<conio.h> 
void main() 
{ 
int arr[3][3], i, j; 
clrscr(); 
printf(“Enter Array Elementn”); 
for(i=0;i<3;i++) 
{ 
for(j=0;j<3;j++) 
{ 
scanf(“%d”,&arr[i][j]); 
} 
} 
printf(“Matrix nn”); 
for(i=0;i<3;i++) 
{ 
for(j=0;j<3;j++) 
{ 
printf(“%d ”,arr[i][j]); 
} 
printf(“n”); 
} 
getch(); 
} 
EXTRA

Weitere ähnliche Inhalte

Was ist angesagt?

C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
vinay arora
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
vinay arora
 

Was ist angesagt? (20)

1D Array
1D Array1D Array
1D Array
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020Basic c programs updated on 31.8.2020
Basic c programs updated on 31.8.2020
 
SaraPIC
SaraPICSaraPIC
SaraPIC
 
c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
 
C program
C programC program
C program
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
Session06 functions
Session06 functionsSession06 functions
Session06 functions
 
Examples sandhiya class'
Examples sandhiya class'Examples sandhiya class'
Examples sandhiya class'
 
4. chapter iii
4. chapter iii4. chapter iii
4. chapter iii
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
Understanding storage class using nm
Understanding storage class using nmUnderstanding storage class using nm
Understanding storage class using nm
 
DataStructures notes
DataStructures notesDataStructures notes
DataStructures notes
 
Ada file
Ada fileAda file
Ada file
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
3. chapter ii
3. chapter ii3. chapter ii
3. chapter ii
 

Andere mochten auch

Array in c language
Array in c languageArray in c language
Array in c language
home
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
Dushmanta Nath
 
Lab 5 array
Lab 5 arrayLab 5 array
Lab 5 array
mkazree
 

Andere mochten auch (20)

C programming function
C  programming functionC  programming function
C programming function
 
C programming string
C  programming stringC  programming string
C programming string
 
C Programming : Arrays
C Programming : ArraysC Programming : Arrays
C Programming : Arrays
 
Arrays
ArraysArrays
Arrays
 
Array in c language
Array in c languageArray in c language
Array in c language
 
Array in c
Array in cArray in c
Array in c
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
Array in c
Array in cArray in c
Array in c
 
Array in c
Array in cArray in c
Array in c
 
Excel vba macro programing
Excel vba macro programingExcel vba macro programing
Excel vba macro programing
 
C string
C stringC string
C string
 
Strings in C
Strings in CStrings in C
Strings in C
 
C programming - String
C programming - StringC programming - String
C programming - String
 
Lab 5 array
Lab 5 arrayLab 5 array
Lab 5 array
 
Application software
Application softwareApplication software
Application software
 
Php oops1
Php oops1Php oops1
Php oops1
 
Computer development
Computer developmentComputer development
Computer development
 
TALLY Payroll ENTRY
TALLY Payroll ENTRYTALLY Payroll ENTRY
TALLY Payroll ENTRY
 
Php basic
Php basicPhp basic
Php basic
 
VISUAL BASIC .net ii
VISUAL BASIC .net iiVISUAL BASIC .net ii
VISUAL BASIC .net ii
 

Ähnlich wie C programming array & shorting

Sorting programs
Sorting programsSorting programs
Sorting programs
Varun Garg
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02
Er Ritu Aggarwal
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Azhar Javed
 

Ähnlich wie C programming array & shorting (20)

Ds
DsDs
Ds
 
Data structure output 1
Data structure output 1Data structure output 1
Data structure output 1
 
Programs
ProgramsPrograms
Programs
 
Sorting programs
Sorting programsSorting programs
Sorting programs
 
Array Programs.pdf
Array Programs.pdfArray Programs.pdf
Array Programs.pdf
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structures
 
array.ppt
array.pptarray.ppt
array.ppt
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
programs on arrays.pdf
programs on arrays.pdfprograms on arrays.pdf
programs on arrays.pdf
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02
 
Cpd lecture im 207
Cpd lecture im 207Cpd lecture im 207
Cpd lecture im 207
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
C programs
C programsC programs
C programs
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
Merge sort in CSolution#include-stdio-h- #define MAX 50 void mergeSort.docx
Merge sort in CSolution#include-stdio-h- #define MAX 50 void mergeSort.docxMerge sort in CSolution#include-stdio-h- #define MAX 50 void mergeSort.docx
Merge sort in CSolution#include-stdio-h- #define MAX 50 void mergeSort.docx
 
C Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossainC Programming Exam problems & Solution by sazzad hossain
C Programming Exam problems & Solution by sazzad hossain
 
Write a program to check a given number is prime or not
Write a program to check a given number is prime or notWrite a program to check a given number is prime or not
Write a program to check a given number is prime or not
 
program on string in java Lab file 2 (3-year)
program on string in java Lab file 2 (3-year)program on string in java Lab file 2 (3-year)
program on string in java Lab file 2 (3-year)
 
PPT.pptx Searching and Sorting Techniques
PPT.pptx Searching and Sorting TechniquesPPT.pptx Searching and Sorting Techniques
PPT.pptx Searching and Sorting Techniques
 
LAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAMLAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAM
 

Mehr von argusacademy (20)

Css & dhtml
Css  & dhtmlCss  & dhtml
Css & dhtml
 
Html table
Html tableHtml table
Html table
 
Html ordered & unordered list
Html ordered & unordered listHtml ordered & unordered list
Html ordered & unordered list
 
Html level ii
Html level  iiHtml level  ii
Html level ii
 
Html frame
Html frameHtml frame
Html frame
 
Html forms
Html formsHtml forms
Html forms
 
Html creating page link or hyperlink
Html creating page link or hyperlinkHtml creating page link or hyperlink
Html creating page link or hyperlink
 
Html basic
Html basicHtml basic
Html basic
 
Java script
Java scriptJava script
Java script
 
Php string
Php stringPhp string
Php string
 
Php session
Php sessionPhp session
Php session
 
Php opps
Php oppsPhp opps
Php opps
 
Php if else
Php if elsePhp if else
Php if else
 
Php creating forms
Php creating formsPhp creating forms
Php creating forms
 
Php create and invoke function
Php create and invoke functionPhp create and invoke function
Php create and invoke function
 
Php array
Php arrayPhp array
Php array
 
Sql query
Sql querySql query
Sql query
 
Rdbms
RdbmsRdbms
Rdbms
 
Oracle
OracleOracle
Oracle
 
Vb.net iv
Vb.net ivVb.net iv
Vb.net iv
 

Kürzlich hochgeladen

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Kürzlich hochgeladen (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
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.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

C programming array & shorting

  • 1.
  • 6. #include<stdio.h> #include<conio.h> void main() { int arr[10], i; clrscr(); printf(“Enter Array Elementn”); for(i=0;i<10;i++) { scanf(“%d”, &arr[i]); } printf(“Array Elementn”); for(i=0;i<10;i++) { printf(“%dn”,arr[i]); } getch(); } EXTRA
  • 10. EXTRA
  • 11. EXTRA
  • 12. #include<stdio.h> #include<conio.h> void main() { int arr[100], s, i , j, temp; clrscr(); printf(“Enter Array Sizen”); scanf(“%d”,&s); printf(“Enter Array Elementn”); for(i=0;i<s;i++) { scanf(“%d”, &arr[i]); } printf(“Array Element befor sortingn”); for(i=0;i<s;i++) { printf(“%dn”, arr[i]); } EXTRA
  • 13. for(i=0;i<s-1;i++) { for(j=0;j<s-1-i;j++) { if(arr[j]>arr[j+1]) { temp=arr[j]; arr[j]=arr[j+1]; arr[j+1]=temp; } } } printf(“Data after sorting n”); for(i=0;i<s;i++) { printf(“%dn”, arr[i]); } getch(); } EXTRA
  • 14. EXTRA
  • 15. #include<stdio.h> #include<conio.h> void main() { int arr[100], s, i , j, temp; clrscr(); printf(“Enter Array Sizen”); sxcanf(“%d”,&s); printf(“Enter Array Elementn”); for(i=0;i<s;i++) { scanf(“%d”, &arr[i]); } printf(“Array Element befor sortingn”); for(i=0;i<s;i++) { printf(“%dn”, arr[i]); } EXTRA
  • 16. for(i=0;i<s-1;i++) { for(j=i+1;j<s;j++) { if(arr[i]>arr[j]) { temp=arr[i]; arr[i]=arr[j]; arr[j]=temp; } } } printf(“Data after sortingn”); for(i=0;i<s;i++) { printf(“%dn”,arr[i]); } getch(); } EXTRA
  • 17. EXTRA
  • 18. EXTRA
  • 19. #include<stdio.h> #include<conio.h> void main() { int arr[10],s, p, temp,i,k; clrscr(); printf("enter Array Sizen"); scanf("%d",&s); printf("Enter Array Elementn"); for(i=0;i<s;i++) { scanf("%d",&arr[i]); } printf("Array Elementn"); for(i=0;i<s;i++) { printf("%dn",arr[i]); } EXTRA
  • 20. for(i=1;i<s;i++) { p=i-1; temp=arr[i]; while(temp<arr[p]&&p>=0) { arr[p+1]=arr[p]; p--; } arr[p+1]=temp; } printf("Data after sortingn"); for(i=0;i<s;i++) { printf("%dn",arr[i]); } getch(); } EXTRA
  • 21. Searching Linear Search Binary Search EXTRA Linear Search- This is the simplest technique to find out an element in an unsorted list. In this technique the value of the key is compared with the first element of the list, if match is found then the search is terminated. Otherwise next element from the list is fetched and compared with the key and this process is continued till the key is found or list is completely.
  • 22. EXTRA Binary Search- Binary search works for sorted lists and is a very efficient searching technique. It is used to find the location of a given element or record in a list. Other information associated with the element can also be fetched if required. To find the location of a file in the computer directory one can use this searching technique. Let low represents lower limit of the list l, high upper and mid is average of low and high that is middle of the lower and upper limits. Mid = (low+high)/2; we compare the middle element with key to be searched. If the value of middle element is greater than key ,then key will exit in lower half of the list, take high = mid-1 and find new value of mid.
  • 23. #include<stdio.h> #include<conio.h> void main() { int arr[100],s, i, first=0, mid=0, last =0, count =0, num; clrscr(); printf(“Enter Array Sizen”); scanf(“%d”,&s); printf(“Enter Array Elementn”); for(i=0;i<s;i++) { scanf(“%d”,&arr[i]); } printf(“Array Elementn”); for(i=0;i<s;i++) { printf(“%dn”,arr[i]); } EXTRA
  • 24. printf(“Enter the no want to search n”); scanf(“%d”,&num); last = s-1; while((first<=last)&&(count==0)) { mid=(first+last)/2; if(arr[i]==num) { count=mid; } else if(arr[i]<num) { first=mid+1; } else { last=mid-1; } } EXTRA
  • 25. if(count>0) { printf(“No found”); } else { printf(“No not found”); } getch(); } EXTRA
  • 26. Double Dimension Array #include<stdio.h> #include<conio.h> void main() { int arr[3][3], i, j; clrscr(); printf(“Enter Array Elementn”); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf(“%d”,&arr[i][j]); } } printf(“Matrix nn”); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf(“%d ”,arr[i][j]); } printf(“n”); } getch(); } EXTRA