Posts

Showing posts with the label C

What is Data Type and variables in C? Easy explanation with real world analogy.

Image
PDF Link  Click Here for PDF PPT Link  Click Here for PPT Code Link  Click Here For Code What is Data Type? The data type is an entity that specifies, what type of data we are storing in a variable. There are mainly 2 type of data types in C: Primitive Non-primitive Enumeration (optional) Let's understand them one by one. Primitive Data Type It is the system's pre-defined or pre-declared data structure and can store only one type of value. Example: Integer, Float, Character. Non-primitive Data Type It is the user-defined data structure, which means we are the ones who will choose what and how to store our data in what manner. Example: Array, Linked list, Stack, Queue, structure, pointer, union, etc. Enumeration Data Type (optional) It is also a user-defined data type, but it is reserved for making integral constants in the C language. What is a Variable? A Variable is like a container that stores a specific type of data. You can understand easily by this example: Have you...

Stop writing this code again & again | Make boilerplate in VS Code for C

Image
What is boilerplate? In VS Code there is one option called user snippet. In it, we can declare a code that that is being repeatedly used by us like basic structure of C program. Afterwards, when we call it by using defined keyword or say Prefix. The intellisence of VS Code will detect and write that pre-decleared code for us. Advantages: Saves time Reduce error Boilerplate Code Link:  Click here How to make Boilerplate for C in VS Code Step 1: In bottom left you can see gear like icon ⚙️ click on it. Step 2: Click on User Snippet . Step 3: Select C.json Step 4: Copy and paste the given code in it and save the file by ctrl + s. Hurray your boilerplate is ready to use! Just try to type boilerplate in C program file you will see a suggestion just click on it and your code is automatically completed.

How to install C Compiler and make VS Code ready for Getting Started with C

Image
Getting started with C - 01 This blog can be divided into two parts: Installing VS Code (IDE) Setting it up for an optimised experience Installing C Compiler Watch Full Installation Video It's my guarantee after watching my video you won't be left with any confusion. Link down below: Installing VS Code Step 01: Click on the given link Click here Step 02: Directly click on Windows it will download the installer. Step 03: Run the installer 3.1 : Accept the Agreement and click on Next . 3.2 : You can change the location where you want to install. I will recommend going with the default location. Click on Next . 3.3 : Click on Next . 3.4 : Enable all the options . Which are Created Shortcut, Add "Open with Code" like given in the image below. And click on Next. 3.5 : Click on Install . 3.6 : Click on Finish . Now, VS CODE will open up for the first time. So it will take a while. Setup VS Code for C programming Make sure you are conn...