Programmator
Programmator
  • Home
  • Download
  • Social
    • YouTube
    • Instagram
    • Facebook
    • Telegram
  • Features
    • C/C++
    • Java
  • Contact Us
Write a C program to swap the two values using pointers

Method 1.

In this program we are going to swap two numbers using pointers. The pointer will be used to hold the address of the variable and using pointer address of the variables will be swepped. In the following example we are going to implement this theory. 

  •  Program:

#include<stdio.h>
#include<conio.h>
   
void main()
{

//Declaration of variables and pointer variables
int x,y,*ptr_x,*ptr_y,temp;  

//Insert value of x and y
printf("Enter the value of x and y\n");
scanf("%d%d", &x, &y);

//Printing value before swapping
printf("Before Swapping\nx = %d\ny = %d\n", x, y);

//Assigning address of variables to pointers
ptr_x = &x;
ptr_y = &y;

//Swapping pointer address with the help of temp variable
temp = *ptr_y;
*ptr_y = *ptr_x;
*ptr_x = temp;

//printing values of x and y
printf("After Swapping\nx = %d\ny = %d\n", x, y);
getch();
}

  •  Output:

Enter the value of x and y 100 123 Before Swapping x = 100 y = 123 After Swapping x = 123 y = 100


Method 2.

Logic To Swap Two Numbers using Pointers and Function

We ask the user to enter values for variable a and b. We pass the address of variable a and b to function swap().

Inside function swap() we take a local variable temp. Since address of variable a and b are passed to swap() method, we take 2 pointer variables *x and *y. Pointer variable x holds the address of a and pointer variable y holds the address of b. Using below logic we swap the values present at address a( or x ) and b( or y ).

temp = *x;
*x = *y;
*y = temp;

Since we are directly changing the value present at particular address, the value gets reflected throughout the program and not just inside particular function. That’s why we are able to print the result inside main function and the values of variable a and b are swapped, without getting any returned value from function swap().

  •  Program:

#include<stdio.h>
#include<conio.h>
   
void swap(int*, int*);
int main()
{
    int a, b;

    printf("Enter the value for a and b\n");
    scanf("%d%d", &a, &b);

    printf("\n\nBefore swapping: a = %d and b = %d\n",a, b);
    swap(&a, &b);
    printf("\nAfter sawpping: a = %d and b = %d\n", a, b);
    return 0;
}
void swap(int *x, int *y)
{
    int temp;

    temp = *x;
    *x = *y;
    *y = temp;
}

  •  Output:

Enter the value for a and b 100 200 Before swapping: a = 100 and b = 200 After sawpping: a = 200 and b = 100

  •  Visit:

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
In this tutorial, we will learn about how to create a program in C that prints address of any variable. At last we will also learn about printing an address of a variable in C using pointer.

Definition:
Pointer is the variable that holds the address of another variable.

Syntax:
pointer_vaibale = &variable;
  •  Program:

#include <stdio.h>

int main(void)
{
    int i=15;
    int *p;
    p=&i;
    printf("\n Address of Variable i = %u",p);
    return 0;
}

  •  Output:

Address of Variable i = 6422296

  •  Visit :

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
Design a structure student_record to contain name, branch and total marks obtained. Develop a program to read data for 10 students in a class and print them

In this program, a structure (student) is created which contains name, Branch and marks as its data member. Then, an array of structure of 5 elements is created. Then, data (name, Branch and marks) for 5 elements is asked to user and stored in array of structure. Finally, the data entered by user is displayed.

Here is source code of the C program to calculate The Marks Branch and Name of Students . The C program is successfully compiled. The program output is also shown below.

  •  Program:

#include <stdio.h>

struct student_record
{
    char name[20];
    char branch[20];
    int total_marks;
}p[5];

int main(void)
{
    int i=0,n=5;
 
    for(i=0;i<n;i++)
    {
        printf("\n Enter Student Name : ");
        scanf("%s",p[i].name);
        printf("\n Enter Students Branch : ");
        scanf("%s",p[i].branch);
        printf("\n Enter Students Marks : ");
        scanf("%d",&p[i].total_marks);
    }
 
    for(i=0;i<n;i++)
    {
        printf("\n Student %d Detail",i+1);
        printf("\n Name        = %s",p[i].name);
        printf("\n Branch      = %s",p[i].branch);
        printf("\n Total marks = %d",p[i].total_marks);
    }
    return 0;
}

  •  Output:

Enter Student Name : Nilesh Enter Students Branch : IT Enter Students Marks : 89 Enter Student Name : Ila Enter Students Branch : CE Enter Students Marks : 90 Enter Student Name : Vishu Enter Students Branch : CS Enter Students Marks : 80 Enter Student Name : Krishna Enter Students Branch : CSE Enter Students Marks : 87 Enter Student Name : Kishn Enter Students Branch : BA Enter Students Marks : 91 Student 1 Detail Name = Nilesh Branch = IT Total marks = 89 Student 2 Detail Name = Ila Branch = CE Total marks = 90 Student 3 Detail Name = Vishu Branch = CS Total marks = 80 Student 4 Detail Name = Krishna Branch = CSE Total marks = 87 Student 5 Detail Name = Kishn Branch = BA Total marks = 91

  •  Visit:

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
Define a structure called cricket that will describe the following information
Player name
Team name
Batting average
Using cricket, declare an array player with 5 elements and write a C program to read the information about all the 5 players and print team wise list containing names of players with their batting average.

In this program we are going to implement a structure called cricket which will hold three members as player name, team name, batting average. We will take input of these information from user and then print it to output window.

  •  Program:

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

struct cricket
{
    char pname[20];
    char tname[20];
    float bavg;
};

int main()
{
    struct cricket s[5],t;
    int i,j,n=5;
    float p;

    printf("\nEnter data of %d players",n);
    for(i=0;i<n;i++)
    {
        printf("\nEnter PName, TName,s BAvg for player-%d = ",i+1);
        scanf("%s %s %f",s[i].pname,s[i].tname,&p);
        s[i].bavg=p;
    }

    for(i=1;i<=n-1;i++)
    {
        for(j=1;j<=n-i;j++)
        {
            if(strcmp(s[j-1].tname,s[j].tname)>0)
            {
                t=s[j-1];
                s[j-1]=s[j];
                s[j]=t;
            }
        }
    }

    printf("\nAfter teamwise sorting... Player list is ");
    for(i=0;i<n;i++)
    {
        printf("\n%-20s %-20s %.2f",s[i].pname,s[i].tname,s[i].bavg);
    }

    getch();
    return 0;
}

  •  Output:

 

Enter data of 5 players Enter PName, TName,s BAvg for player-1 = sachin India 98 Enter PName, TName,s BAvg for player-2 = rahul India 45 Enter PName, TName,s BAvg for player-3 = jointy Australia 75 Enter PName, TName,s BAvg for player-4 = imran Pakistan 65 Enter PName, TName,s BAvg for player-5 = shen Australia 29 After teamwise sorting... Player list is jointy Australia 75.00 shen Australia 29.00 sachin India 98.00 rahul India 45.00 imran Pakistan 65.00

  •  Visit:

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
C Program using structure for time format

Define structure data type called time_struct containing three member’s integer hour, integer minute and integer second. Develop a program that would assign values to the individual number and display the time in the following format: 16: 40:51

In this program we are going to implement a structure called time_struct containing three member’s integer hour, integer minute and integer second.

  •  Program:

#include <stdio.h>

struct time_struct
{
    int hour;
    int minute;
    int second;
}t;

int main(void)
{
    printf("\n Enter Hour : ");
    scanf("%d",&t.hour);
    printf("\n Enter Minute: ");
    scanf("%d",&t.minute);
    printf("\n Enter Second : ");
    scanf("%d",&t.second);

    printf("\n Time %d:%d:%d",t.hour%24,t.minute%60,t.second%60);
 
    return 0;
}

  •  Output:


Enter Hour : 15 Enter Minute: 35 Enter Second : 55 Time 15:35:55

  •  Visit:

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
Define a structure type struct personal that would contain person name, date of joining and salary using this structure to read this information of 5 people and print the same on screen

C Program to read and print employee details

In this program we are going to implement a structure Personal which contains name, date of joining and salary of employees.

  •  Program:

#include<stdio.h>
struct person
{
   char name[20];
   char doj[10];
   float salary;
}p[5];

int main(void)
{
   int i=0;

   for(i=0;i<5;i++)
   {
      printf("\n Enter person name :");
      scanf("%s", p[i].name);
      printf("\n Person Date of joining(dd-mm-yyyy) : ");
      scanf("%s",p[i].doj);
      printf("\n Enter person salary : ");
      scanf("%f",&p[i].salary);
   }

   for(i=0;i<5;i++)
   {
      printf("\n Person %d Detail",i+1);
      printf("\n Name = %s",p[i].name);
      printf("\n DOJ = %s",p[i].doj);
      printf("\n Salary = %.2f",p[i].salary);
   }
   return 0;
}

  •  Output:

Enter person name :Ajay Person Date of joining(dd-mm-yyyy) : 11-10-2018 Enter person salary : 20000 Enter person name :Binod Person Date of joining(dd-mm-yyyy) : 21-06-2018 Enter person salary : 25000 Enter person name :Chinmay Person Date of joining(dd-mm-yyyy) : 04-04-2019 Enter person salary : 28000 Enter person name :Kriti Person Date of joining(dd-mm-yyyy) : 26-05-2019 Enter person salary : 30000 Enter person name :Mansi Person Date of joining(dd-mm-yyyy) : 06-03-1900 Enter person salary : 29000 Person 1 Detail Name = Ajay DOJ = 11-10-2018 Salary = 20000.00 Person 2 Detail Name = Binod DOJ = 21-06-2018 Salary = 25000.00 Person 3 Detail Name = Chinmay DOJ = 04-04-2019 Salary = 28000.00 Person 4 Detail Name = Kriti DOJ = 26-05-2019 Salary = 30000.00 Person 5 Detail Name = Mansi DOJ = 06-03-1900 Salary = 29000.00

  •  Visit:

Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 ) Here
Write a C program to find out distance travelled by the equation d=ut+at^2 Here
Write a C program to find that the accepted number is negative or positive or zero Here
Write a program to read mark of a student from keyboard the student is pass or fail ( using if else ) Here
Write a program to read three numbers from keyboard and find out maximum out of these three. (nested if else) Here
Write a program to check whether the entered character is capital, small letter, digit or any special character Here
Write a program to read marks from keyboard and your program should display equivalent grade according to following table (if else ladder) Here
Write a C program to prepare pay slip using following data Here
Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday Here
Write a C program to find out the Maximum and Minimum number from given 10 numbers Here
Write a C program to input an integer number and check the last digit of number is even or odd Here 
Write a C program to find factorial of a given number Here
Write a C program to reverse a number Here
Write a C program to generate first n number of Fibonacci series Here
Write a C program to find out sum of first and last digit of a given number Here
Write a C program to find the sum and average of different numbers Here
Write a program to calculate average and total of 5 students for 3 subjects Here
Read five persons height and weight and count the number of person having height greater than 170 and weight less than 50 Here
Write a program to check whether the given number is prime or not Here
Write a program to evaluate the series 1^2+2^2+2+3^2+……+n^2 Here
Write a C program to find 1+1/2+1/3+1/4+....+1/n Here
Write a C program to find 1+1/2!+1/3!+1/4!+.....+1/n! Here
Write a C program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9! Here
Write a C program to read and store the roll no and marks of 20 students using array Here
Write a C program to find out which number is even or odd from list of 10 number using array Here
Write a program to find maximum element from 1-Dimensional array Here
Write a C program to calculate the average, geometric and harmonic mean of n elements in a array Here
Write a program to delete a character in given string Here
Write a program to replace a character in given string Here
Write a program to find a character from given string Here
Write a program to sort given array in ascending order Here
Write a program to reverse string Here
Write a program to convert string into upper case Here
Write a program that defines a function to add first n numbers Here
Write a function in the program to return 1 if number is prime otherwise return 0 Here
Write a function Exchange to interchange the values of two variables, say x and y. illustrate the use of this function in a calling function Here
Write a C program to use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + … xn/ n! Here
Write a program to find factorial of a number using recursion Here
Write a function that will scan a character string passed as an argument and convert all lowercase character into their uppercase equivalents Here
Write a program to read structure elements from keyboard Here
Newer Posts Older Posts Home

ABOUT

I could look back at my life and get a good story out of it. It's a picture of somebody trying to figure things out.

SUBSCRIBE & FOLLOW

POPULAR POSTS

  • Write a C program to enter a distance in to kilometer and convert it in to meter, feet, inches and centimeter
  • Write a C program to computer Fahrenheit from centigrade ( f=1.8*c+32 )
  • Write a C program to interchange two numbers
  • Write a program to that performs as calculator (Addition, Multiplication, Division, Subtraction)
  • Write a program to find area of triangle ( a=h*b*0.5 ) | a=area, h=height, b=base

Advertisement

👆 Shopping 👆

Powered by Blogger

Archive

  • February 20241
  • January 20242
  • November 20234
  • October 20236
  • September 20236
  • August 20235
  • April 20231
  • March 20231
  • October 20221
  • August 20223
  • July 20222
  • May 20223
  • April 20222
  • March 20221
  • January 20221
  • December 20216
  • November 20214
  • October 20211
  • September 20216
  • August 202127
  • July 20216

Report Abuse

Copyright

  • Home
  • About us
  • Privacy Policy
  • Disclaimer
  • Contact Us

About Me

Nilesh Patel
View my complete profile

Copyright © Programmator. Designed by OddThemes