Please find recent Articles on C/C++ here !!

Basics,   Variable Declaration, Definition and Scope,   Data Types,   Storage Classes,   Input/Output,   Operators,   Preprocessor,   Array & Strings,   Control Statements,   Functions,   Pointers,   Enum, Struct and Union,   Memory Management,   File Handling,   Puzzles,   Misc,   C Language GATE Questions,   Output Questions,   Quizzes on C,

Basics:

  1. C Language Introduction
  2. C Programming Language Standard
  3. Is it fine to write “void main()” or “main()” in C/C++?
  4. Difference between “int main()” and “int main(void)” in C/C++?
  5. Macros and Preprocessors in C
  6. Compiling a C program:- Behind the Scenes

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

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

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

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()

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

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?

Arrays & Strings:

  1. Introduction to Arrays in C Language
  2. Properties of array in C Language
  3. Do not use sizeof for array parameters
  4. Initialization of variables sized arrays in C
  5. Are array members deeply copied?
  6. What is the difference between single quoted and double quoted declaration of char array?
  7. Initialization of a multidimensional arrays in C/C++
  8. Write one line functions for strcat() and strcmp()
  9. What’s difference between char s[] and char *s in C
  10. gets() is risky to use!
  11. C function to Swap strings,
  12. Storage for Strings in C
  13. Difference between array and pointer
  14. How to dynamically allocate a 2D array in C?
  15. How to pass a 2D array as a parameter in C?
  16. How to write long strings in Multi-lines C/C++?
  17. What are the data types for which it is not possible to create an array?
  18. Variable Length Arrays in C and C++

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

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?

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

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++

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?

File Handling:

  1. fseek() vs rewind() in C
  2. EOF, getc() and feof() in C
  3. fopen() for an existing file in write mode

Puzzles:

  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()

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())

C Language GATE Questions:

  1. C Language | Set 1
  2. C Language | Set 2
  3. C Language | Set 3
  4. C Language | Set 4
  5. C Language | Set 5
  6. C Language | Set 6
  7. C Language | Set 7
  8. C Language | Set 8
  9. C Language | Set 9

Output Questions:

  1. Output of C Programs | Set 1
  2. Output of C Programs | Set 2
  3. Output of C Programs | Set 3
  4. Output of C Programs | Set 4
  5. Output of C Programs | Set 5
  6. Output of C Programs | Set 6
  7. Output of C Programs | Set 7
  8. Output of C programs | Set 8
  9. Output of C Programs | Set 9
  10. Output of C Programs | Set 10
  11. Output of C Programs | Set 11
  12. Output of C Programs | Set 12
  13. Output of C Programs | Set 13
  14. Result of sizeof operator
  15. Output of C Programs | Set 14
  16. Output of C Programs | Set 15
  17. Output of C Programs | Set 16
  18. Output of C++ Program | Set 1
  19. Output of C Program | Set 17
  20. Output of C Program | Set 18
  21. Output of C Program | Set 19
  22. Output of C Program | Set 20
  23. Output of C Program | Set 21
  24. Output of C Program | Set 22
  25. Output of C Program | Set 23
  26. Output of C Program | Set 24
  27. Output of C program | Set 25
  28. Output of C Program | Set 26
  29. Output of C Program | Set 27
  30. Output of C Program | Set 28

Quizzes on C

  1. Input and Output
  2. Data Types
  3. Variable Declaration and Scope
  4. Storage Classes and Type Qualifiers
  5. Operators
  6. Loops & Control Structure
  7. Structure & Union
  8. Macro & Preprocessor
  9. Arrays
  10. String
  11. Functions
  12. Pointer Basics
  13. Dynamic Memory Allocation
  14. Misc
  15. Advanced Pointer
  16. File Handling
  17. Commonly Asked C Programming Interview Questions | Set 1
  18. Commonly Asked C Programming Interview Questions | Set 2

C/C++ Programs

Coding Practice Platform

 

Company Wise Coding Practice    Topic Wise Coding Practice