Code2night
  • Home
  • Guest Posts
  • Tutorial
  • Languages
    • Angular
    • C
    • C#
    • HTML/CSS
    • Java
    • JavaScript
    • Node.js
    • Python
    • React
    • SQL Server
    • TypeScript
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
    • Word Counter
    • Base64 Encode/Decode
    • Diff Checker
    • JSON to CSV
    • Password Generator
  • Register
  • Login
  1. Home
  2. Blogpost

Chapter-2(Basic Fundamental tool)

Date- Dec 09,2023

3416

1. Character Sets:

A character set is a set of characters with a specific encoding scheme used for representing textual information in a programming language. In C, the basic character set includes letters, digits, and special characters.

Example:-

#include<stdio.h>

#include<conio.h>

void main()

{

     clrscr();

   char myChar='A';

   printf("Character: %c\n", myChar);

   getch();

}

2. Keywords:

Keywords are reserved words in a programming language that have a predefined meaning. These words cannot be used as identifiers (names for variables, functions, etc.) because they are already used by the language.

Example:-

#include<stdio.h>

#include<conio.h>

void main() 

{

    clrscr();

    int num = 5;

    if(num > 0) {

        printf("The number is positive.\n");

    }

  getch();

}

In this example, 'if' is keywords. instead of this example while, for, break, goto, else also are keywords.

3. Data Types:

A variable's data type defines the kind of data it can store. C supports various data types, including int, float, char, double, etc.

Example:-

#include <stdio.h>

#include <conio.h>

void main() 

{

   clrscr();

    int integerVar = 10;

    float floatVar = 3.14;

    char charVar = 'A';

   printf("Integer: %d\n", integerVar);

    printf("Float: %f\n", floatVar);

    printf("Character: %c\n", charVar);

     getch();

}


4. Constants:

Constants are values that do not change while a program is running. They come in a variety of forms, including integer constants, floating-point constants, and character constants.

Example:-

#include <stdio.h>

#include<conio.h>

#define PI 3.14159 // Macro for a constant

void main() 

{

   clrscr();

    const int MAX_VALUE = 100; // Constant variable

  printf("PI: %f\n", PI);

    printf("Max Value: %d\n", MAX_VALUE);

  getch();

}

5. Variables:

Variables are containers for storing data values. Before they can be utilized, they need to be specified with a data type.

Example:-

#include <stdio.h>

#include<conio.h>


void main() 

{

   clrscr();

    int age; // Declaration

    age = 25; // Initialization

    printf("Age: %d\n", age);

    getch();

}

In this example, age is a variable of type int.


These fundamental concepts are the building blocks of C programming, and understanding them is crucial for writing effective and readable code.

S
Shubham Saini
Programming author at Code2Night — sharing tutorials on ASP.NET, C#, and more.
View all posts →

Comments

Tags

AspNet
C#
programming
AspNet MVC
c programming
AspNet Core
C
software development
tutorial
MVC
memory management
Paypal
coding
coding best practices
data structures
programming tutorial
tutorials
object oriented programming
Slick Slider
StripeNet
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1760
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp Join Us On Facebook
Code2Night

A community platform for sharing programming knowledge, tutorials, and blogs. Learn, write, and grow with developers worldwide.

Panipat, Haryana, India
info@code2night.com
Quick Links
  • Home
  • Blogs
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
Free Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • Password Generator
  • QR Code Generator
  • Hash Generator
  • Diff Checker
  • Base64 Encode/Decode
  • Word Counter
By Language
  • Angular
  • C
  • C#
  • HTML/CSS
  • Java
  • JavaScript
  • Node.js
  • Python
  • React
  • SQL Server
  • TypeScript
© 2026 Code2Night. All Rights Reserved.
Made with for developers  |  Privacy  ·  Terms
Translate Page