C_Language_Coding
1.33K 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
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
I think everyone have bank account but howmany guys have deamat account ?
Anonymous Poll
37%
Yes,I have demat account.
42%
No,I didn't have any demat account .
12%
I didn't believe in stock market .
9%
Other
Happy diwali everyone πŸŽ†
Hi! I use CoinDCX app to invest in Bitcoin. Use my invite link to download the app & get β‚Ή100 Free Ethereum when you make your first investment - https://join.coindcx.com/invite/NJFt

5 Million+ Indians use CoinDCX for their cryptocurrency investments. It's safe, secure and BitGo Insured.
114. Program to delete given number from array.

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

void main()
{
int array[10];
int i, n, pos, element, found = 0;
clrscr();

printf("Enter total number of elements : ");
scanf("%d", &n);
printf("\nEnter the elements : \n");

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

printf("Input array elements are\n");

for (i = 0; i < n; i++)
{
printf("\n%d", array[i]);
}

printf("\nEnter the element to be deleted : ");

scanf("%d", &element);

for (i = 0; i < n; i++)
{
if (array[i] == element)
{
found = 1;
pos = i;
break;
}
}

if (found == 1)
{
for (i = pos; i < n - 1; i++)
{
array[i] = array[i + 1];
}

printf("\nResultant array elements are : ");

for (i = 0; i < n - 1; i++)
{
printf("\n%d", array[i]);
}
}
else
{
printf("\nElement %d is not found in the array", element);
}
getch();
}
@programming_and_coding
Forwarded from C_Language_Coding
5_6208254524902081083.pdf
116.2 KB
Top 30 HR round question and perfect answer

Share with family nd friend to help them.

Telegram:-
@programming_and_coding
*Looking for one app to research, analyse, invest? Join Upstox!*

Opening an Upstox account is easy-peasy. All you need is your PAN + Aadhaar. You can sign-up online using my link within the next 7 days: https://link.upstox.com/SeFm

πŸ›’ Upstox makes investing fun and it feels just like online shopping!

πŸ’Έ With special filters + smartlists they make the search for the right investment simple

πŸ’° They’ve got SIP modes for both Mutual Funds & Stocks

πŸ“° They’re easy to understand with news, research & insights on all investments

πŸ“ˆ And have a separate app for traders with TradingView, GTT orders, Option Chain

*P.S. Sign up with a number not registered with Upstox before. Can’t wait to welcome you to the Upstox famπŸ‘‹!*
πŸš€ Elevate Your Coding Skills with C Language! 🌐

Join our Telegram Channel dedicated to all things C programming! πŸ€–πŸ’»
@programming_and_coding

πŸ” What's in Store?
- Learn the fundamentals and advanced concepts of C.
- Explore real-world coding examples and projects.
- Stay updated with the latest trends and best practices.

πŸ‘₯ Connect with a Community of Coders:
- Engage in discussions with fellow C enthusiasts.
- Share your knowledge and learn from others.
- Collaborate on exciting coding challenges.

🚨 Don't Miss Out:
Whether you're a beginner or an experienced developer, our channel has something for everyone! πŸš€

πŸ“Œ Join Now: @programming_and_coding

Unlock the power of C programming and take your coding journey to new heights! πŸš€πŸ’‘ #CLanguage #CodingCommunity #LearnToCode
C_Language_Coding pinned Β«πŸš€ Elevate Your Coding Skills with C Language! 🌐 Join our Telegram Channel dedicated to all things C programming! πŸ€–πŸ’» @programming_and_coding πŸ” What's in Store? - Learn the fundamentals and advanced concepts of C. - Explore real-world coding examples and projects.…»
πŸš€ **Code Challenge
#115: Mastering Pointers in C!**

Hey Coders! πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Let's dive into the world of pointers with today's challenge! 🎯


#include <stdio.h>

int main() {
// Declare an integer variable
int num = 42;

// Declare a pointer and point it to the address of 'num'
int *ptr = &num;

// Modify the value using the pointer
*ptr += 8;

// Print the updated value
printf("The new value of num is: %d\n", num);

return 0;
}



πŸ€” Challenge Task:
1. Understand how the pointer ptr is initialized.
2. Use the pointer to increment the value of num by 8.
3. Print the updated value of num.

πŸ’‘ Hint: Remember to dereference the pointer using * to access and modify the value it points to.

Happy coding! πŸš€πŸ’» #CodeChallenge #CProgramming #PointersInC
Share it your friends and family.

@programming_and_coding
πŸš€ Code Challenge #115: Array Manipulation in C!

Hello Coders! πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Let's continue our coding journey with today's challenge – Manipulating Arrays! πŸŒπŸ”

116: Remove Duplicates from Array


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

void main()
{
int array[10];
int i, n, pos, element, found = 0;
clrscr();

printf("Enter total number of elements : ");
scanf("%d", &n);
printf("\nEnter the elements : \n");

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

printf("Input array elements are\n");

for (i = 0; i < n; i++)
{
printf("\n%d", array[i]);
}

printf("\nEnter the element to be deleted : ");

scanf("%d", &element);

for (i = 0; i < n; i++)
{
if (array[i] == element)
{
found = 1;
pos = i;
break;
}
}

if (found == 1)
{
for (i = pos; i < n - 1; i++)
{
array[i] = array[i + 1];
}

printf("\nResultant array elements are : ");

for (i = 0; i < n - 1; i++)
{
printf("\n%d", array[i]);
}
}
else
{
printf("\nElement %d is not found in the array", element);
}
getch();
}


πŸ€” Challenge Task:
Modify the provided code to remove duplicates from the array and display the result.

Share with your friend
@programming_and_coding
Happy coding! πŸš€πŸ’» #CodeChallenge #CProgramming #ArrayManipulation
πŸš€ Code Challenge #116: Searching in a Sorted Array

Hello, Coding Enthusiasts! πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Dive into today's challenge focused on searching in a sorted array! πŸ”πŸŒ

Question 116: Binary Search in a Sorted Array


#include <stdio.h>

int binarySearch(int array[], int low, int high, int target) {
while (low <= high) {
int mid = low + (high - low) / 2;

if (array[mid] == target)
return mid;

if (array[mid] < target)
low = mid + 1;
else
high = mid - 1;
}

return -1; // Target not found
}

int main() {
int array[] = {2, 5, 8, 12, 16, 23, 38, 42, 56, 72};
int n = sizeof(array) / sizeof(array[0]);
int target = 23;

int result = binarySearch(array, 0, n - 1, target);

if (result != -1)
printf("Element %d found at index %d", target, result);
else
printf("Element %d not found in the array");

return 0;
}

πŸ€” Challenge Task:
1. Understand the provided binary search algorithm.
2. Execute the algorithm to find the index of the target element (e.g., 23) in the sorted array.

Happy coding! πŸš€πŸ’»
Join us on [Telegram](https://t.me/programming_and_coding) for more coding discussions and challenges! #CodeChallenge #CProgramming #BinarySearch