C Programming Language


1-C Language Introduction

2C Programming Language Standard

3int (1 sign bit + 31 data bits) keyword in C

4Is it fine to write “void main()” or “main()” in C/C++?

5Difference between “int main()” and “int main(void)” in C/C++?

6-Macros and Preprocessors in C

7Compiling a C program | Behind the Scenes

8Benefits of C over other languages

9Program error signals

10Escape sequences in C

11Line Splicing  in C

12-Tokens C/C++

2-Variable Declaration, Definition and Scope

  1. Variables and Keywords in C
  2. How are variables scoped in C – Static or Dynamic?
  3. Scope rules in C
  4. How Linkers Resolve Multiply Defined Global Symbols?
  5. Quiz on Variable Declaration and Scope
  6. Complicated declarations in C
  7. Redeclaration of global variable in C
  8. Internal and External Linkage
  9. Declare variable as constant
  10. Why variables doesn’t start with numbers
  11. Redeclaration of global variables
  12. Initialization of global and static variables

3-Data Types

  1. Data Types in C
  2. Use of bool in C
  3. Integer Promotions in C
  4. Quiz on Data Types in C
  5. Comparison of a float with a value in C
  6. Need of long data type in C
  7. size_t data type in C
  8. Interesting facts about data-types and modifiers
  9. Float and Double in C
  10. Character arithmetic in C
  11. Typecasting in C

4-Storage Classes

  1. Storage Classes in C
  2. Static Variables in C
  3. Understanding “extern” keyword in C
  4. What are the default values of static variables in C?
  5. Understanding “volatile” qualifier in C
  6. Const Qualifier in C
  7. Initialization of static variables in C
  8. Understanding “register” keyword in C
  9. Quiz on Storage Classes in C
  10. Understanding volatile qualifier in C- Set 1

5- Input/Output

  1. Returned values of printf() and scanf()
  2. What is return type of getchar(), fgetc() and getc() ?
  3. Scansets in C
  4. puts() vs printf() for printing a string
  5. What is use of %n in printf() ?
  6. How to print % using printf()?
  7. Quiz on Input Output in C
  8. Difference between printf, sprintf and fprintf?
  9. Difference between getc(), getchar(), getch() and getche()
  10. Difference between %d and %i format specifier
  11. Use of fflush(stdin) in C
  12. Clearing input buffer in C/C++
  13. scanf() and fscanf() in C
  14. getchar_unlocked() in C
  15. Problem with scanf()
  16. Differentiate printable and control character
  17. rand() and srand() in C/C++

6- Operators

  1. Introduction to operators in C and Arithmetic Operators
  2. Relational and Logical Operators in C
  3. Bitwise Operators in C
  4. Operator Precedence and Associativity in C
  5. Evaluation order of operands
  6. Comma in C and C++
  7. sizeof operator in C
  8. Operands for sizeof operator
  9. A comma operator question
  10. Result of comma operator as l-value in C and C++
  11. Order of operands for logical operators
  12. Increment (Decrement) operators require L-value Expression
  13. Precedence of postfix ++ and prefix ++ in C/C++
  14. Modulus on Negative Numbers
  15. C/C++ Ternary Operator – Some Interesting Observations
  16. Pre-increment (or pre-decrement) in C++
  17. Difference between ++*p, *p++ and *++p
  18. Results of comparison operations in C and C++
  19. To find sum of two numbers without using any operator
  20. Sequence Points in C
  21. Execution of printf with ++ operators
  22. Anything written in sizeof() is never executed
  23. Difference between strlen() and sizeof()
  24. Stringizing and Token-pasting operator

7- Preprocessor

  1. Write a C macro PRINT(x) which prints x
  2. Variable length arguments for Macros
  3. Multiline macros in C
  4. CRASH() macro – interpretation
  5. The OFFSETOF() macro,
  6. Branch prediction macros in GCC
  7. Diffference between #define and const in C?
  8. A C Programming Language Puzzle
  9. What’s difference between header files “stdio.h” and “stdlib.h” ?
  10. How to print a variable name in C?
  11. Constants in C
  12. How a Preprocessor works
  13. Preprocessor Directives : Behind the scene-1
  14. Preprocessor Directives : Behind the scene-2
  15. isgraph() library function
  16. write your own header file in C
  17. difftime() library function
  18. tmpnam() library function
  19. _Generic keyword in C
  20. math.h library functions
  21. typedef versus #define in C
  22. strftime() library function
  23. exec family of functions

8-Arrays & Strings

  1. Introduction to Arrays in C Language
  2. Strings in C Language
  3. Properties of array in C Language
  4. Do not use sizeof for array parameters
  5. Initialization of variables sized arrays in C
  6. Are array members deeply copied?
  7. What is the difference between single quoted and double quoted declaration of char array?
  8. Initialization of a multidimensional arrays in C/C++
  9. Write one line functions for strcat() and strcmp()
  10. What’s difference between char s[] and char *s in C
  11. gets() is risky to use!
  12. C function to Swap strings,
  13. Storage for Strings in C
  14. Difference between array and pointer
  15. How to dynamically allocate a 2D array in C?
  16. How to pass a 2D array as a parameter in C?
  17. How to write long strings in Multi-lines C/C++?
  18. What are the data types for which it is not possible to create an array?
  19. Variable Length Arrays in C and C++
  20. Short hand array notation
  21. Accessing array out of bounds
  22. strcpy() in C/C++
  23. strcmp() in C/C++
  24. strdup() and strdndup() in C/C++
  25. Pass an array by value
  26. Reverse a string in C/C++
  27. strpbrk() in C
  28. strcoll() in C/C++
  29. ispunct() in C
  30. strspn() in C
  31. isalpha() and isdigit() in C/C++

9-Control Statements

  1. What should be data type of case labels of switch statement in C?
  2. For Versus While
  3. A nested loop puzzle
  4. switch statement in C
  5. Difference between while(1) and while(0)
  6. goto statement
  7. Continue Statement
  8. Break Statement
  9. Using range in switch case

10- Functions

  1. Functions in C
  2. Importance of function prototype in C
  3. Functions that are executed before and after main() in C
  4. return statement vs exit() in main()
  5. How to Count Variable Numbers of Arguments in C?,
  6. What is evaluation order of function parameters in C?
  7. Does C support function overloading?
  8. How can we return multiple values from a function?
  9. What is the purpose of a function prototype?
  10. Static functions in C
  11. exit(), abort() and assert()
  12. Implicit return type int in C
  13. What happens when a function is called before its declaration in C?
  14. _Noreturn function specifier in C
  15. exit() vs _Exit()
  16. __func__ identifier in C
  17. Callback function in C
  18. Nested functions in C
  19. Parameter Passing Techniques
  20. pow() function in C
  21. tolower() function in C
  22. time() function in C

11- Pointers

  1. Introduction to pointers in C and C++
  2. Double Pointer (Pointer to Pointer) in C
  3. Why C treats array parameters as pointers?
  4. Output of the program | Dereference, Reference, Dereference, Reference
  5. Dangling, Void , Null and Wild Pointers
  6. An Uncommon representation of array elements
  7. How to declare a pointer to a function?
  8. Pointer vs Array in C
  9. void pointer in C
  10. NULL pointer in C !
  11. Function Pointer in C
  12. near, far and huge pointers
  13. Generic Linked List in C
  14. restrict keyword in C
  15. const char *p, char * const p and const char * const p
  16. Pointer to an Array

12-Enum, Struct and Union

  1. Enum in C
  2. Structures in C
  3. Union in C
  4. Struct Hack
  5. Structure Member Alignment, Padding and Data Packing
  6. Operations on struct variables in C
  7. Bit Fields in C
  8. Structure Sorting (By Multiple Rules) in C++
  9. Flexible array members in structure
  10. Difference between Structure and Union
  11. Difference between C structures and C++ structures
  12. Anonymous Union and Structure in C
  13. Compound Literals in C

13-Memory Management

  1. Memory Layout of C Programs,
  2. How to deallocate memory without using free() in C?
  3. calloc() versus malloc()
  4. How does free() know the size of memory to be deallocated?
  5. Use of realloc()
  6. What is Memory Leak? How can we avoid?

14-File Handling

  1. fseek() vs rewind() in C
  2. EOF, getc() and feof() in C
  3. fopen() for an existing file in write mode
  4. Read/Write structure to a file
  5. fgets() and gets() in C
  6. Basics of File Handling
  7. fsetpos() in C
  8. rename function in C/C++
  9. tmpfile() function in C
  10. fgetc() and fputc() in C
  11. fseek() in C/C++
  12. ftell() in C
  13. lseek() in C/C++
  14. remove function in C/C++
  15. Merge contents of two files into a third file
  16. Print contents of file in C


  1. C Program to print numbers from 1 to N without using semicolon?
  2. How to find sum of two numbers without using any operator
  3. How will you show memory representation of C variables?
  4. Condition To Print “HelloWord”
  5. Change/add only one character and print ‘*’ exactly 20 times
  6. How can we sum the digits of a given number in single statement?
  7. What is the best way in C to convert a number to a string?
  8. Calculate Logn in one line
  9. Print “Even” or “Odd” without using Conditional statement
  10. How will you print numbers from 1 to 100 without using loop?
  11. How can we sum the digits of a given number in single statement?
  12. How will you print “Geeks for Geeks” without using a semicolon
  13. Write a one line C function to round floating point numbers
  14. How will implement Your Own sizeof
  15. How to count set bits in a floating point number in C?
  16. How to change the output of printf() in main() ?
  17. How to find length of a string without string.h and loop in C?
  18. Implement your own itoa()
  19. Write a C program that does not terminate when Ctrl+C is pressed
  20. How to measure time taken by a function in C?
  21. Print a long int in C using putchar() only
  22. Convert a floating point number to string in C
  23. How to write a running C code without main()?
  24. Write your own memcpy()
  25. C program to print characters without using format specifiers
  26. C program to print a string without any quote (singe or double) in the program
  27. Execute both if and else statements simultaneously
  28. Print “Hello World” without using any header file

16- Misc

  1. Quine – A self-reproducing program
  2. Complicated declarations in C
  3. Use of bool in C
  4. Sequence Points in C | Set 1
  5. Optimization Techniques | Set 2 (swapping),
  6. ASCII NUL, ASCII 0 (’0?) and Numeric literal 0
  7. Little and Big Endian Mystery,
  8. Comparator function of qsort() in C
  9. Program to validate an IP address
  10. Multithreading in C
  11. Assertions in C/C++
  12. fork() in C
  13. Interesting Facts in C Programming
  14. Precision of floating point numbers in C++ (floor(), ceil(), trunc(), round() and setprecision())
  15. setjump() and longjump() in C
  16. nextafter() and nexttoward() in C/C++
  17. pthread_cancel() in C
  18. pthread_equal() in C
  19. pthread_self() in C
  20. Local Labels in C
  21. lvalue and rvalue in C
  22. Get and set the stack size of thread attribute
  23. Difference between fork() and exec()
  24. Errors in C/C++
  25. Why is C considered faster than other languages
  26. Incompatibilities between C and C++
  27. Convert C/C++ code to assembly language
  28. Error Handling in C
  29. Executing main() in C/C++ : Behind the scene
  30. Hygienic Macros in C
  31. Command line arguments in C/C++
  32. scanf(), fscanf(), sscanf(), scanf_s(), fscanf_s(), sscanf_s()
  33. Some Interesting Facts in C Programming
  34. Database Connectivity using C/C++
  35. Function Interposition in C
  36. Macros vs Functions
  37. Write your own memcpy() and memmove()

You May Also Like

Abdul Vakeel

About the Author: Abdul Vakeel

WPBeginner Blog is a Free WordPress Resource Site For Beginners. WPBeginner Blog Was Founded in 4th June 2018 by Abdul Vakeel.The Main Goal of This Site is to Provide Quality Tips, Tricks, Hacks, and Other WordPress Resources That Allows WordPress Beginners to Improve Their Site.

Leave a Reply

Your email address will not be published. Required fields are marked *