C_Language_Coding
1.34K subscribers
4 files
31 links
This channel will serve you C language program from basic to advance in a serial order that help you in understand the basic and crack any IT examination in easy way .

Invite other to Subscribe this channel on telegram
@Programming_and_Coding
Download Telegram
107. Program to reverse the string using pointer.

#include<stdio.h>
#include<conio.h>

void main()
{
char str_array[10000], *ptr;
int i, len;
clrscr();

printf("Enter a string : ");
gets(str_array);
ptr = str_array;

for (i = 0; i < 10000; i++)
{
if (*ptr == '\0')
break;
ptr++;
}

len = i;
ptr--;
printf("\nReversed String is : ");
for (i = len; i > 0; i--)
{
printf("%c", *ptr--);
}
getch();
}

@programming_and_coding
108. Program to sort the strings.

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

void main()
{
int i, j, n;
char str[20][20], temp[20];
clrscr();

printf("Enter the number of string to be sorted : ");
scanf("%d", &n);

for (i = 0; i <= n; i++)
gets(str[i]);

for (i = 0; i <= n; i++)
for (j = i + 1; j <= n; j++)
{
if (strcmp(str[i], str[j]) > 0)
{
strcpy(temp, str[i]);
strcpy(str[i], str[j]);
strcpy(str[j], temp);
}
}

printf("\nSorted string :");
for (i = 0; i <= n; i++)
{
puts(str[i]);
}
getch();
}
@programming_and_coding
🔰Adobe MEGA MOD Pack🔰

🔥Contents of the MEGA Pack-

👉Adobe Premiere Pro CC 2018
👉Adobe Prelude CC 2018
👉Adobe Lightroom CC 2018
👉Adobe Lightroom Classic CC 2018
👉Adobe Photoshop CC 2018
👉Adobe Muse CC 2018
👉Adobe Media Encoder CC 2018
👉Adobe InDesign CC 2018
👉Adobe InCopy CC 2018
👉Adobe Illustrator CC 2018
👉Adobe Dreamviewer CC 2018
👉Adobe Dimensions CC 2018
👉Adobe Character Animator CC 2018
👉Adobe Bridge CC 2018
👉Adobe Audition CC 2018
👉Adobe Animate CC 2018
👉Adobe After Effects CC 2018



🔥 Download Link :- https://drive.google.com/drive/u/0/folders/1yDGZ4lOhPiEkG7bG8M8qs5X-E7_I-85d

Only on @programming_and_coding

📌Note: The Above Softwares are Provided in Google Drive! So, Download Them ASAP!
109. Program to swap two strings.

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

void main()
{
char str1[100], str2[100], *temp;
clrscr();

printf("Enter first string : ");
gets(str1);

printf("Enter second string : ");
gets(str2);

printf("\nBefore Swapping : \n");
printf("First string : %s\n", str1);
printf("Second string : %s\n", str2);

temp = (char *) malloc(100);

strcpy(temp, str1);
strcpy(str1, str2);
strcpy(str2, temp);

printf("\nAfter Swapping : \n");
printf("First string : %s\n", str1);
printf("Second string : %s\n", str2);
getch();
}
@programming_and_coding
110. Program to add two matrix.

#include<stdio.h>
#include<conio.h>

void main()
{
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
clrscr();

printf("Enter the number of rows and columns of matrix :");
scanf("%d%d", &m, &n);
printf("\nEnter the elements of first matrix : \n");

for (c = 0; c < m; c++)
{
for (d = 0; d < n; d++)
{
scanf("%d", &first[c][d]);
}
}

printf("\nEnter the elements of second matrix : \n");

for (c = 0; c < m; c++)
{
for (d = 0; d < n; d++)
{
scanf("%d", &second[c][d]);
}
}

printf("\nSum of entered matrices : \n");

for (c = 0; c < m; c++)
{
for (d = 0; d < n; d++)
{
sum[c][d] = first[c][d] + second[c][d];
printf("%d\t", sum[c][d]);
}
printf("\n");
}
getch();
}
@programming_and_coding
TCS NQT Registration Started

Last Date: 10th Feb 2021
Exam Date: 18th - 19th Feb 2021
Batch: 2018/19/20/21/22


Registration Link: https://prepflix.in/tcs-nqt

~ via PrepFlix
Telegrem: @programming_and_coding


https://prepflix.in/tcs-nqt
111. Program to arrange array numbers in ascending order.

#include<stdio.h>
#include<conio.h>

void main()
{
int i, j, a, n, number[30];
clrscr();

printf("Enter total numbers : ");
scanf("%d", &n);
printf("\n Enter the numbers :\n");

for (i = 0; i < n; ++i)
{
scanf("%d", &number[i]);
}

for (i = 0; i < n; ++i)
{
for (j = i + 1; j < n; ++j)
{
if (number[i] > number[j])
{
a = number[i];
number[i] = number[j];
number[j] = a;
}
}
}

printf("The numbers arranged in ascending order are :\n");

for (i = 0; i < n; ++i)
{
printf("%d\n", number[i]);
}
getch();
}
@programming_and_coding
Airtel Recruitment | 14.75 to 17.5LPA |BE - CS/IT | 2019 2020 2021 Batch

https://assessment.hackerearth.com/challenges/hiring/airtel-i-code/

Telegram: @programming_and_coding
112. Program to check whether the matrix is sparse matrix or not.

#include<stdio.h>
#include<conio.h>

void main()
{
static int array[10][10];
int i, j, m, n;
int counter = 0;
clrscr();

printf("Enter the order of the matix : ");
scanf("%d %d", &m, &n);
printf("\nEnter the co-efficients of the matix :\n");
for (i = 0; i < m; ++i)
{
for (j = 0; j < n; ++j)
{
scanf("%d", &array[i][j]);
if (array[i][j] == 0)
{
++counter;
}
}
}
if (counter > ((m * n) / 2))
{
printf("The given matrix is sparse matrix \n");
}
else
{
printf("The given matrix is not a sparse matrix \n");
}

printf("There are %d number of zeros", counter);
getch();
}
Join : @programming_and_coding
TCS Smart Hiring | BSC/BCA/BCS | 2019,2020,2021 Batch

Last Date - 23 May 2021
Exam Date - 6th June 2021

tcs.com/careers/smart-hiring-IT-drive

Telegram - @programming_and_coding
Are you pursuing BCA course?
Anonymous Poll
55%
Yes
47%
No
113. Program to delete an element from array.

#include<stdio.h>
#include<conio.h>

void main()
{
int array[100], position, c, n;
clrscr();

printf("Enter total number of elements in array : ");
scanf("%d", &n);

printf("\nEnter element %d : ", n);

for (c = 0; c < n; c++)
scanf("%d", &array[c]);

printf("\nEnter the location from where you wish to delete element : ");
scanf("%d", &position);

if (position >= n + 1)
printf("\nDeletion not possible.");
else
{
for (c = position - 1; c < n - 1; c++)
array[c] = array[c + 1];

printf("\nResultant array is :");

for (c = 0; c < n - 1; c++)
printf("\n%d", array[c]);
}
getch();
}
@programming_and_coding
Cognizant GenC Campus Recruitment | 4.5 LPA | 2021 Batch | Last date - 11 June

bit.ly/3ilbttQ

~via PrepFlix
Telegram - @programming_and_coding