Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

C program to read and print a matrix using pointers

Categories: Pointers. 1 Comment on C program to read and print a matrix using pointers

In this article we will learn to implement a C program to read and print a matrix using pointers. A C program is provided below to read and print a matrix using pointers and dynamic memory allocation.   Program is as follows: #include<stdio.h> #include<stdlib.h> int main() { int m, n; printf("Enter no. of rows and […]

Read the rest of this entry »

C program to reverse a given string

Categories: Strings. 1 Comment on C program to reverse a given string

In this article we will learn to implement a C program to reverse a given string. A C program is provided below to reverse a given string without using predefined function.   Program is as follows: #include<stdio.h> #include<string.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); int length = strlen(str); for(int i=0, […]

Read the rest of this entry »

C program to compare two strings without using library function

Categories: Strings. No Comments on C program to compare two strings without using library function

In this article we will learn to implement a C program to compare two strings without using library function. A C program is provided below to compare two strings without using predefined function. Program is as follows: #include<stdio.h> #include<string.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); char newstr[20]; printf("Enter another string: […]

Read the rest of this entry »

C program to concatenate two strings without using library functions

Categories: Strings. No Comments on C program to concatenate two strings without using library functions

In this article we will learn to implement a C program to concatenate two strings without using library functions. A C program is provided below to join or concatenate two strings without using predefined function like strcat. Program is as follows: #include<stdio.h> #include<string.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); char […]

Read the rest of this entry »

C program to copy one string to another

Categories: Strings. No Comments on C program to copy one string to another

In this article we will learn to implement a C program to copy one string to another. A C program is provided below to copy one string to another without using predefined function strcpy.   Program is as follows: #include<stdio.h> #include<string.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); char newstr[20]; int i=0; […]

Read the rest of this entry »

C program to find the length of a string without using strlen

Categories: Strings. No Comments on C program to find the length of a string without using strlen

In this article we will learn to implement a C program to find the length of a string without using strlen. A C program is provided below to find length of a string without using predefined function.   Program is as follows: #include<stdio.h> int main() { char str[20]; printf("Enter a string: "); scanf("%s", str); int […]

Read the rest of this entry »

C program to reverse an array in place using pointers

Categories: Pointers. No Comments on C program to reverse an array in place using pointers

In this article we will learn to implement a C program to reverse an array in place using pointers. A C program is provided below to reverse the given array in place using pointers. Program is as follows: #include<stdio.h> void reversearray(int *p, int n) { int *first = p; int *last = p+n-1; while(first<last) { […]

Read the rest of this entry »

C program to reverse an array in place

Categories: Arrays. No Comments on C program to reverse an array in place

In this article we will learn to implement a C program to reverse an array in place (without using a temporary array. A C program is provided below to reverse an array in place. Program is as follows: #include<stdio.h> int main() { int array[20]; int n; printf("Enter number of elements: "); scanf("%d", &n); printf("Enter array […]

Read the rest of this entry »