22 Aug 2021, 10:46 UTC≈299,000 viewsread 25 August 2026 144. Circular Link List.
#include<stdio.h>
#include<stdlib.h>
typedef struct Node {
int data;
struct Node *next;
} node;
void insert(node *pointer, int data)
{
node *start = pointer;
while (pointer->next != start)
{
pointer = pointer->next;
}
pointer->next = (node *)
malloc(sizeof(node));
pointer = pointer->next;
pointer->data = data;
pointer->next = start;
…
Signed jeNiSh
8 May 2021, 09:43 UTC≈293,000 viewsread 25 August 2026 143. Program to allocate memory using malloc() and free memory using free().
#include<stdio.h>
#include<stdlib.h>
int main() {
int n, i, *ptr, sum = 0;
printf("Enter total number of elements : ");
scanf("%d", &n);
ptr = (int *) malloc(n * sizeof(int));
if (ptr == NULL) {
printf("Error! Memory not allocated.");
return 0;
}
printf("Enter elements of array : \n");
fo…
Signed jeNiSh
8 May 2021, 09:33 UTC≈266,000 viewsread 25 August 2026 142. Program to concatenate two strings using pointer.
#include <stdio.h>
void concatenator(char *str, char *substr) {
while (*str)
str++;
while (*substr) {
*str = *substr;
substr++;
str++;
}
*str = '\0';
}
int main() {
char str[100], substr[100];
printf("Enter the source string : ");
gets(str);
printf("\nEnter string to concatenate : ");
ge…
Signed jeNiSh
28 Feb 2021, 18:46 UTC≈266,000 viewsread 25 August 2026 141. WAP to multiply and add two complex numbers
Input :
5
-4
4
6
Output :
Sum is 9 + 2i
Product is 44 + 14i
#include<stdio.h>
#include<conio.h>
typedef struct {
int real;
int imag;
} complex;
void getdata (complex *);
void display (complex);
complex sum(complex,complex);
complex mult(complex,complex);
main() {
complex c1,c2,c3,c4;
getdata(&c1);
getdata(&c2);
c3=sum(c1,c2);
printf("Sum is ");
display…
Signed jeNiSh
30 Jan 2021, 20:38 UTC≈236,000 viewsread 25 August 2026 140. Program to find day on a particular date
#include<stdio.h>
int isLeapYear(int year){
if(year%4==0){
if(year%100==0 && year%400!=0){
return 0;
}
else{
return 1;
}
}
else{
return 0;
}
}
int main() {
int year;
int refYear=1600, leap=0;
int diff, totalDays,day,month, oddDays;
int lYear[]={3,1,3,2,3,2,3,3,2,3,2,3};
…
Signed jeNiSh
30 Nov 2020, 02:40 UTC≈236,000 viewsread 25 August 2026 139. Program to read multiline string using scanf.
#include<stdio.h>
int main(void) {
char str[100];
// reading multline string with '.' as a delimiter
scanf("%[^.]",str);
printf("%s",str);
return 0;
}
#program_by : @freakyLuffy
Signed jeNiSh
30 Nov 2020, 02:38 UTC≈225,000 viewsread 25 August 2026 138. Program to split words from a string using strtok function.
#include <stdio.h>
#include<string.h>
int main(void) {
char str[]="Welcome to C language";
char *token=strtok(str," ");
while(token!=NULL)
{
printf("%s\n",token);
token=strtok(NULL," ");
}
return 0;
}
#program_by : @freakyLuffy
Signed jeNiSh
17 Nov 2020, 19:35 UTC≈222,000 viewsread 25 August 2026 137. Program to check whether the number is palindrome or not using recursion.
#include<stdio.h>
int checkPalindrome(int);
int main() {
int n, sum;
printf("Enter a number : ");
scanf("%d",&n);
sum = checkPalindrome(n);
if(n == sum)
printf("%d is a palindrome", n);
else
printf("%d is not a palindrome", n);
return 0;
}
int checkPalindrome(int n) {
static int s…
Signed jeNiSh
17 Nov 2020, 06:54 UTC≈202,000 viewsread 25 August 2026 136. Binary search using recursion
#include<stdio.h>
int binary(int arr[], int n, int search, int l, int u);
int main()
{
int arr[10], i, n, search, c, l, u;
printf("Enter the size of an array : ");
scanf("%d", &n);
for (i = 0; i < n; i++)
{
printf("Enter the element %d : ", i+1);
scanf("%d", &arr[i]);
}
printf("Enter the number to be search: ");
scanf("%d", &sear…
Signed jeNiSh
16 Jul 2020, 18:31 UTC≈232,000 viewsread 25 August 2026 135. Sieve of Eratosthenes : An algorithm to generate all the prime numbers within an range.
#include <stdio.h>
#define size 1000
int main (void)
{
int n;
scanf("%d",&n);
int arr[size]={0};
for(int i=2;i*i<=n;i++)
{
for(int j=i;i*j<=n;j++)
{
arr[i*j]=1;
}
}
for(int i=2;i<=n;i++)
{
if(!arr[i])
printf("%d ",i);
}
return 0;
}
…
Signed jeNiSh
12 Jul 2020, 18:22 UTC≈220,000 viewsread 25 August 2026 134. Program to delete a node for a given element from linked list.
#include <stdio.h>
#include<stdlib.h>
typedef struct node {
int data;
struct node *next;
}Node;
int main(void)
{
Node*temp;
Node*start=NULL;
Node* p=NULL;
int n;
scanf("%d",&n);
while(n--)
{
temp=(Node *)malloc(sizeof(struct node));
scanf("%d",&temp->data);
temp->next=NULL;
if(start==NULL)
{
start=te…
Signed jeNiSh
12 Jul 2020, 18:06 UTC≈190,000 viewsread 25 August 2026 133. Program for creating and displaying a linked list.
#include <stdio.h>
#include<stdlib.h>
typedef struct node {
int data;
struct node *next;
}Node;
int main(void)
{
Node*temp;
Node*start=NULL;
Node* p=NULL;
int n;
scanf("%d",&n);
while(n--)
{
temp=(Node *)malloc(sizeof(struct node));
scanf("%d",&temp->data);
temp->next=NULL;
if(start==NULL)
{
start=temp;
p=…
Signed jeNiSh
Showing the 12 most recent of 20 posts we hold for @C_Codings. View and reaction counts are the latest single reading for each post, not a live figure, and a recent post is still accumulating both. A view count marked ≈ was rounded by Telegram before we ever saw it — t.me prints views in full below 1,000 and to three significant figures above, so ≈1,200,000 means somewhere between 1,150,000 and 1,249,999. Unmarked counts are exact. Text is reproduced from the public post preview and truncated for length.