How to use the scanf statement within a function by using pointers.
Scanf in C.
Date Created:Tuesday March 06th, 2007 09:56 PM
Date Modified:Saturday August 02nd, 2008 03:15 PM
#include <stdio.h>
void enternumbers();
int main()
{
int note1;
enternumbers(¬e1);
printf("%d\n", note1);
return 0;
}
void enternumbers(int *x) {
printf("Enter in a number:\n");
scanf("%d", x);
}
Downloads:
Download: scanf.c 229 B
Please login or Click Here to register for downloads
Scanf inside a function by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
