What is Digraphs, Trigraphs and Tokens? - C/C++ Programming Language

In computer programming, digraphs and trigraphs are sequences of two and three characters, respectively, that appear in source code and, according to a programming language specification, should be treated as if they were single characters. Why Digraphs and Trigraphs exist? Various reasons exist for using digraphs and trigraphs: keyboards may

Storage Classes in C Programming Language

Storage class specifiers are the keywords which can appear next to the top-level type of a declaration. The use of these keywords affects the storage duration and linkage of the declared object, depending on whether it is declared at file scope or at block scope: 1. auto This storage class

An Untold Story of Storage Class in C Programming Language

Storage class specifiers are the keywords which can appear next to the top-level type of a declaration. The use of these keywords affects the storage duration and linkage of the declared object, depending on whether it is declared at file scope or at block scope: Keyword Storage Duration Linkage Remarks

Simple and Static Assertion (assert) in C Programming Language

An assertion is a statement used to assert that a fact must be true when that line of code is reached. Assertions are useful for ensuring that expected conditions are met. 1. Simple Assertion Simple assertion can be implemented using assert(expression) method of assert.h header file. Syntax assert(

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;

C Programming Language Version History

As you know, C was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Labs, and used to re-implement the Unix operating system. It has since become one of the most widely used programming languages of all time, with C compilers from various vendors available for the majority

C Language Style Guide

This style guide is different from others you may see, because the focus is centered on readability and understandability. 1. Variable and method/function 1.1. Variable and method/function names that contain multiple characters must not start with an uppercase letter. Further, each "word" within a variable name should

Call a method without calling it -Programming Puzzles

Can you come up with a way to get a particular method executed, without explicitly calling it? The more indirect it is, the better. Here's what I mean, exactly (C used just for exemplification, all languages accepted): // Call this. void the_function(void) { printf("Hi there!\n"); } int main(int

(x == x+2) make it equal for x - Programming Puzzles

Define value of x in such a way that the expression (x == x+2) would evaluate to true. No rule for this programming puzzle. Solutions Jump to C, CSharp, JavaScript, PHP Solution. You can submit your own solution in comment section in same/different programming language. If your solution is
Load more