Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

What is a getNum function in c?

+8 votes
asked Feb 22, 2025 by abhiram rangavajhala (810 points)
Please help.

1 Answer

–1 vote
answered Feb 22, 2025 by cpp guy (1,020 points)

i don't think that's a thing in C, but you can make a function called getNum()

#include <stdio.h>
void getNum() {
  int x;

  scanf("%d",&x);

  printf("you entered : %d",x);

}

int main() {

  getNum();

}

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...