Answers for "scanf in char in c"

C
5

how make a character in c scanf

scanf(" %c", &c);
Posted by: Guest on July-08-2020
-1

scanf in c

#include <stdio.h>
int main()
{
//Notice, that we have used &testInteger inside scanf(). 
//It is because &testInteger gets the address of testInteger, 
//and the value entered by the user is stored in that address.
    int testInteger;
    printf("Enter an integer: ");
    scanf("%d", &testInteger);  
    printf("Number = %d",testInteger);
    return 0;
}
Posted by: Guest on March-01-2022

Code answers related to "C"

Browse Popular Code Answers by Language