Using the volatile variable

Wednesday, October 15, 2014
/* 1405.c: Using the volatile variable */
#include <stdio.h>

int main()
{
    read_keyboard();
    return 0;
}

void read_keyboard()
{
volatile char keyboard_ch[100];
printf("Enter a string:\n");
scanf("%s", keyboard_ch);
printf("Keyboard read = %s\n",keyboard_ch);
}

Copyright @ 2015 Tron!

Labels

Blog Archive