My issue
is my code correct or not give the correct code
My code
// Debug the code below to solve the problem
#include<stdio.h>
// Function to increment a number using a pointer
void incrementByOne(int numPtr) {
(numPtr++); // Increment the value pointed to by numPtr
}
int main() {
int number;
scanf("%d",&number);
// Call the increment function and pass the address of 'number'
incrementByOne(&number);
printf("%d\n", number);
return 0;
}
Learning course: Programming and Problem solving using C
Problem Link: https://www.codechef.com/learn/course/ciet-programming-c/CIETPC31/problems/PPSC139