c function that recieves pointer

Solutions on MaxInterview for c function that recieves pointer by the best coders in the world

showing results for - "c function that recieves pointer"
Carla
17 Jan 2019
1#include <stdio.h>
2void salaryhike(int  *var, int b)
3{
4    *var = *var+b;
5}
6int main()
7{
8    int salary=0, bonus=0;
9    printf("Enter the employee current salary:"); 
10    scanf("%d", &salary);
11    printf("Enter bonus:");
12    scanf("%d", &bonus);
13    salaryhike(&salary, bonus);
14    printf("Final salary: %d", salary);
15    return 0;
16}
similar questions
queries leading to this page
c function that recieves pointer