C Program To Segregate 0's and 1's In An Array using Counting Method

preview_player
Показать описание

Write a C program to segregate 0’s to the left and 1’s to the right of an array using counting method.

Input/Output:
Enter 5 elements(0 or 1)
0
1
1
0
0

Array after segregating o’s to left and 1’s to right
0
0
0
1
1

In the program we also check if the user entered anything other than 0 or 1.

C Programming Interview / Viva Q&A List

C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

why can't we use the bubble sort here

pradnyachougule
visit shbcf.ru