Array Reversal In C - Exercise 5: C Tutorial In Hindi #36

preview_player
Показать описание
In this series of C programming tutorial videos, I have explained you everything you need to know about C language. I hope you are enjoying this C course in Hindi.

Best Hindi Videos For Learning Programming:

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

I really liked your python series 😍
and the way of your teaching in Hindi in funny and entertaining.

coderaky
Автор

hi harry
main abhi apki python tutorials dekh raha
mujhe apke sikhane ka tarika boht accha lagta
maine pehle vi or ek insaan ka vdo dekh kar sikh raha tha par woh important se jyadaa faltu bate batata thaaa, or ayse hi us vdos ko dekh k 2 month waste ho gaya
par ap important cheez hi batate ho isliye boht kuch jan ne k baad vi main pehle se apki videos dekh raha huuu,
keep it up
agr ho sake to apni sari vdos drive main upload kar dena take teqnical issue main kho na
love from bangladesh
#siyam fahad

siyamfahad
Автор

Haris please python advanced course banao mere saath toh kuch hua tha parso mein jab aapki jarvis waali 58 minutes ki video dekhi tab se python mujhe samjh mein aarahi hai warna mujhe bohut problem hoti thi python samjhne mein

Thanks... 💛💛💛

amitjain
Автор

challange accepted

#include <stdio.h>
//making a progmamme in which a function will return the reverse of a array before and after
void func1(int arg[])
{
printf("before reverse :-\n");
for (int i = 0; i < 6; i++)
{
printf("%d ", arg[i]);
}
printf("\n");
printf("After reverse :-\n");
for (int j = 5; j > -1; j--)
{
printf("%d ", arg[j]);
}
}
int main()
{
int s1[]={1, 2, 3, 4, 5, 6};
func1(s1);
return 0;
}

VaibhavSecurities
Автор

bro you damn good❤❤
# pr ager bhai aap kuch trickey c questions hr video ke saath refer kare to aru acha koga

priyanshusharma
Автор

#feedback
bhaiya please do live streaming sometimes for live doubts..

directionsinfinite
Автор

You can also reverse the loop an print reverse array

VidyaPatil-kdwj
Автор

# programs aur hone chiye practice ke liye sir aur solution bhi

majidkhan
Автор

I'm seeing everyone here is using function but none of them are using intuitive approach.... Which is sad bcz intuitive approach shows your real skill.

theshield
Автор

and you are doing so good job for us bro

princehacks
Автор

#hardworkingHARRY

NEVER POST SOLUTION COMMENT AT ANY CHANNEL BUT HERE BECAUSE OF UR GOOD AND HARD WORK BTW Challenge accepted 💪
#include <stdio.h>
int func1(int* array1){
for(int i=6; i>=0; i--){
printf("%d\n", array1[i]);
}
return 0;
}
int main() {

int array1[7]={1, 2, 3, 4, 5, 6, 7};
func1(array1);
return 0;
}

pokegogamer
Автор

sir i watched your html complete playlist and know i am watching your c language videos

princehacks
Автор

Cinclude<stdio.h>
void main()
{
int arr[4]={1, 2, 3, 5};
for(int i=0;i<4;i++)
{
printf("%d\n", arr[i]);
}
printf("Reversal array");
printf("\n%d", arr[0]+4);
printf("\n%d", arr[1]+1);
printf("\n%d", arr[2]-1);
printf("\n%d", arr[3]-4);
//heavy nhi hai but i will try to improve my code

priyankushkashyap
Автор

#include <stdio.h>
Int main( )
{Int marks[5]={1, 2, 3, 4, 5,6,7};
for(int i=0; i<7;i++)
{printf("the Mark's of student %d is %d \n, I, Mark's [6-i];
}return 0;
}

ytintech
Автор

#include <stdio.h>
#include <string.h>

int main()
{
char str[30];
printf("Enter the array you want to reverse.\n");
gets(str);
printf("\n");

puts(strrev(str));
printf("\n");

puts(strrev(str));

return 0;
}

hafizkamran
Автор

i did it using for loop:
here is the code:
#include <stdio.h>
int main()
{
int a;
printf("how many elements do you want to enter in array:");
scanf("%d", &a);
int arr[a], i;
printf("this is a program to take input of an array and reverse it\n");
for (i=0;i<a;i++){
printf("enter the %d value of array:", i+1);
scanf("%d", &arr[i]);
}
printf("array without reversal is:[ ");
for (int j=0;j<a;j++){
printf("%d ", arr[j]);
}
printf("]");
printf("\narray with reversal is:[ ");
for (int k=a-1;k>=0;k--){
printf("%d ", arr[k]);
}
printf("]");
return 0;
}

unosbros
Автор

Challenge accepted sir

#include<stdio.h>

int main()
{
int arr[7]= {1, 2, 3, 4, 5, 6, 7};

printf("Old:\n");
for(int i=0; i<7; i++)
{
printf("%d ", arr[i]);
}
printf("\n");

printf("New:\n");
for(int i=6; i>=0; i--)
{
printf("%d ", arr[i]);
}

return 0;
}

varunkolanu
Автор

#include <stdio.h>

void arrayRev(int array[]) {
int i = 8;
while(i >= 0) {
printf("%d", array[i]);
i--;
}
printf("\n");
}

int main()
{
int array[8] = {1, 2, 3, 4, 5, 6, 7, 8};
arrayRev(array);

return 0;
}

ythashtagms
Автор

# challenge accepted


#include <stdio.h>
void reverse(int x[], int y);
void element(int x[], int y);
void og(int x[], int y);
int main()
{
int arr[10], size;
// Size of array
printf("enter the size of the array:\n");
scanf("%d", &size);
// Initialization of elements
printf("Enter the elements of the array:\n");
element(arr, size);
// Elements before reversal
printf("Before reversing:\n");
printf("elements of array are:\n");
og(arr, size);
// Elements after reversal
printf("After reversing:\n");
printf("the elements of array are:\n");
reverse(arr, size);
return 0;
}
void reverse(int x[], int y)
{
int i, j, temp;
int val=0;
if(y%2==0)
val=1;
for (i = 0, j = y - 1; i <= (y / 2) - val; i++, j--)
{
temp = x[i];
x[i] = x[j];
x[j] = temp;
}
og(x, y);
}

void element(int x[], int y)
{
for (int i = 0; i < y; i++)
scanf("%d", &x[i]);
}
void og(int x[], int y)
{
for (int i = 0; i < y; i++)
printf("%d ", x[i]);

printf("\n");
}

Tushar.
Автор

Challenge accepted


#include <stdio.h>
#include <conio.h>
void arrayRev(int arg1[])
{
int a, b, c, d, e, f, g;
a = arg1[6];
b = arg1[5];
c = arg1[4];
d = arg1[3];
e = arg1[2];
f = arg1[1];
g = arg1[0];
printf("\nThe reverse array is\n(%d, %d, %d, %d, %d, %d, %d)", a, b, c, d, e, f, g);
}
int main()
{
int arr[] = {1, 2, 3, 4, 5, 6, 67};
printf("The array is\n{1, 2, 3, 4, 5, 6, 67}");
arrayRev(arr);
getch();
return 0;
}

muhammadsameer