pass the pointer in C
// passing a pointer to function in C
// It increaments the salary of an employee
#include <stdio.h>
void salaryhike(int *var, int b)
{
*var = *var+b;
}
int main()
{
int salary=0, bonus=0;
printf("Enter the employee current salary:");
scanf("%d", &salary);
printf("Enter bonus:");
scanf("%d", &bonus);
salaryhike(&salary, bonus);
printf("Final salary: %d", salary);
return 0;
}
Also in C:
- stack implementation using linked list in c
- azure storage emulator config
- get current used proxy windows 7
- round robin algorithm in c
- hello world
- 233 pounds to inr
- c fork wait for child
- pointer arithmetic C
- insert image material ui
- confirm sweet alert
- No module named 'vectormath'
- c read a whole string from a file
- c rand range
- best sites for loop practice c
- c allocate array
- windows block application au demarrage regegit
- cannot update windows 10
- text wrap terminal colour
- Write a c program to count the different types of characters in given string.
- Declaring Variables in C
- c check if char is an operator
- how to make services in linux
- fread
- XAudio2 C