Pitfalls

A collection of 1 Articles

11 Most Common Pitfalls in C Programming Language

1. Mixing signed and unsigned integers in arithmetic operations It is usually not a good idea to mix signed and unsigned integers in arithmetic operations. For example, what will be output of following example? #include <stdio.h> int main(void) { unsigned int a = 1000; signed int b = -1;
Load more