stdio


1. Read a Character from Standard Input

#include <stdio.h>

int main() {
  char ch;
  ch = getchar();
  printf("%c", ch);
  return 0;
}

2. Write a Character to Standard Output

#include <stdio.h>

int main() {
  char ch = 'a';
  putchar(ch);
  return 0;
}

3. Read a String from Standard Input

#include <stdio.h>

int main() {
  char str[50];
  fgets(str, 50, stdin);
  printf("%s", str);
  return 0;
}

4. Write a String to Standard Output

5. Read an Integer from Standard Input

6. Write an Integer to Standard Output

7. Read a Floating-Point Number from Standard Input

8. Write a Floating-Point Number to Standard Output

9. Read a Character Array from Standard Input

10. Write a Character Array to Standard Output

11. Print a Formatted String

12. Scan a Formatted String

13. Read a Line from Standard Input

14. Write a Line to Standard Output

15. Redirect Standard Input

16. Redirect Standard Output

17. Check for End of File

18. Check for File Error

19. Clear File Error Indicator

20. Flush Standard Output

21. Get File Size

22. Copy File

23. Append to File

24. Read from Pipe

25. Write to Pipe

26. Get Current File Position

27. Set Current File Position

28. Rewind File Position

29. Create Temporary File

30. Remove Temporary File

31. Open File in Binary Mode

32. Open File in Text Mode

33. Check if File Exists

34. Rename File

35. Delete File

36. Create Directory

37. Remove Directory

38. Change Directory

39. Get Current Directory

40. List Files in Directory

41. Check if File is a Directory

42. Check if File is a Regular File