Tag: C Basics

Compiling a C program | Behind the Scenes

How do we compile and run a C program> The following are the means we use on a Ubuntu machine with gcc compiler. We initially make a C program utilizing a proofreader and spare the document as filename.c…

Read More »

Macros and Preprocessors in C

In a C program, all lines that start with # are processed by preprocessor which is a special program invoked by the compiler. In a very basic term, preprocessor takes a C program and produces another C program without any #. Following…

Read More »

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

Consider the following two definitions of main(). And What is the difference? In C++, there is no difference, both are same. The two definitions work in C additionally, however the second definition with void is viewed as actually…

Read More »

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

The definition is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming implementation accepts And A conforming implementation may provide more versions…

Read More »

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

In C programming language a most common keyword ‘int’ is used to define any positive or negative integer. But there is a difference between an integer and the numbers which can be represented with the help of the…

Read More »

C Programming Language Standard

What to do when a C program produces different results in two different compilers?For example, consider the following simple C program. The above program fails in gcc as the return type of main is void, but it compiles…

Read More »

Setting up C++ Development Environment

C++ is a general-purpose programming language and widely used nowadays for competitive programming. It has imperative, object-oriented and generic programming features. C++ runs on lots of platform like Windows, Linux, Unix, Mac, etc. Before we start programming with…

Read More »

C Language Introduction

C  is a procedural programming language. It was initially developed by Dennis Ritchie between 1969 and 1973. It was mainly developed as a system programming language to write operating system. The main features of C language include low-level access…

Read More »

𝐖𝐏𝐁𝐞𝐠𝐢𝐧𝐧𝐞𝐫 𝐁𝐥𝐨𝐠  website uses cookies which may collect personal information. By staying here you are agreeing to our use of cookies and to our terms and conditions which includes our Privacy Policy for use of this website.L̶e̶a̶r̶n̶ ̶M̶o̶r̶e̶.