Search
 
SCRIPT & CODE EXAMPLE
 

C

how to read keyboard input in c

#include <stdio.h>

int main(int argc, char *argv[])  
{
    printf("Enter some keys
");
    char c;
    while((c = getchar()) != 13)   /* 13 is carriage ret in ascii, enter key */     
        printf("%c
", c); 

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: fgets function in c 
C :: what is string::npos 
C :: c sleep milliseconds 
C :: double array in c 
C :: c fopen 
C :: binary tree in c search 
C :: arduino sketch structure 
C :: The fscanf and fprintf functions 
C :: star pattern in c 
C :: c convert float to string 
C :: Write a 64-bit program in assembly that prints Hello, world in .asm 
C :: C (ANSI) 
C :: c check if character is a space 
C :: highest common factor algorithm in c 
C :: millis() 
C :: c include delay 
C :: #define f_cpu 
C :: how to select numeric columns in r 
C :: how to free memory in c 
C :: create arrya of chars malloc 
C :: snprintf c 
C :: how to make two arrays equal in c 
C :: C Syntax of realloc() 
C :: short print variable in c 
C :: type cast in c 
C :: how to belu-roll peoples in c 
C :: findtotalcurtain 
C :: konami code hdl 
C :: false and true in c 
C :: __isoc99_sscanf 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =