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;
}

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
pass pointer c pass a pointer to a function c pass pointer to function in c c program how to pass argument to a function pointer passing a pointer to a pointer in c passing to func value or pointer in c c pass a pointer to function and call it passing pointer to a function in c c pass parameter as pointer c program how to pass pointer c passing by pointer c functions pass by pointer c programming passing in pointers through functions passing pointer as a an argument in c pass pointers to functions c pass by pointer in c pass pointers to function c C passing on a pointer passing a pointer to a function in c pass the pointer in c to a function c pass function as pointer how to pass pointer to function in c how to pass pointers to function in c c pass by pointer how to pass a pointer variable to a function in c pass in pointer to function c pass pointer through function c c pass function pointer how to pass pointers to functions in c pass pointer into function c c pass a variable as a pointer what happens when you pass a pointer in c c pass an int pointer how to pass pointer to a function in c C how to pass a pointer into a function C how to pass a pointer to a function a have it point to a value passing a pointerr to a function how to pass value to pointer in c passing pointer to pointer to function in c how to pass two argument in funnctuion using pointer c send pointer how to pass pointer in c returning pointer from function in c c pointer parameter send what pointer is poting to into function pass pointer in function how to pass a class function pointer to a function in c how to pass a pointer adress to a function how to pass an address of a pointer to a pointer in c passing in a pointer to a function c how to pass a adress of a pointer in a function in c pass a pointer by reference in c pass pointer to function how to pass a pointer by reference in c passing a pointer to a function c how to add pointer in other function how to use pointers in functions c passing pointer to function in c changing and returning it passing pointer to function in c pass pointer form c to asssembly howt o pass pointer in c using pointer in function c how to pass any pointer in c language passig pointer to a function passing pointers to a function in c how to pass array pointer in c how to pass a pointer by reference in c++; how to pass in and refer to a pointer in a functoin are pointers passed by reference or value how to pass a referent to pointer in c how to pass arguments to function with int pointers in c passing pointer to function c_ pass pointer by argument c c how to pass a pointer to a function pointer to function in daty c pass pointer to function take value as pointer function c C FUNCtion that takes a pointer c pass by pointer to function modify original c pass pointer to function but addersses are different c pass pointer to function addersses are different pass pointer of string to function in c how do i pass the pointer of an array in c how to pass a pointer to function in c how to pass a pointer to function passing pointers into functions in c c how to pass pointer how to declare a pointer in param c how to pass array using pointer in c c pass pointer by reference how to pass a pointer to main method send pointer to function c pointer in function c c using pointers in a funtion how to access a pointer from another cuntion in c pointer parameters passing pointers as arguments through functions in c send pointers to functions c passing pointers via functions in c passing a pointer by reference c how to pass pointer to function c how to pass variables as pointers in c passsing pointers function c how to pass a pointer to a function how to receive a pointer into a function send a pointer to a function c c passing pointer to function pointer into function different ways to pass a pointer to a function function parameter pointer are pointers passed by reference in c pass function pointer as parameter in add of two numbers in c how to pass a pointer to a function in c passing a parameter by pointer in C how to pass an integer pointer to a function pass pointer to function c c function passing pointer passing pointer to function c input function using pointer passing pointer through function in c pointer pass to function passing integer pointer to function in c pass pointer to value in C how to acces pointer that has been passed in c passing pointer in c c function with pointer argument passing pointer to function passing pointer in function c write a c program to read 10 students information and print using printinfo() function by passing pointer arguments passing a pointer to a function how to send pointer to function in c how to pass pointer to function a pointer can not be passed to a function send massiv pointer to function in C send pointer to function in C pass a pointer to a function in c Passing pointers to functions in c c function taht takes to a pointer to a pointer to integer as parameter pointer in method in c pointer in methodin c pointer in function in c pointer to integer as parameter how to pass pointer to pointer array to function using pointers to pass parameters inc passing pointers in function argument what if we pass pointer in a function pass the pointer in C
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source