Tech Getz

Main Menu

  • Mobile
  • Apple
  • Computer
  • Contact Us
Sign in / Join

Login

Welcome! Login in to your account
Lost your password?

Lost Password

Back to login

logo

  • Mobile
    • JIO starts 5G service in India next year:Mukesh Ambani

      12/08/2020
      0
    • Xiaomi Mi 10 pro launched with 5G

      03/29/2020
      0
    • Redmi Note 9 Pro launched Rs 14999

      03/12/2020
      0
    • RealMe 6 pro launch in India on March 5

      02/26/2020
      0
    • Vivo S1 Pro Review

      01/27/2020
      0
    • Why Android Studio for App development?

      01/23/2020
      0
    • samsung Galaxy A50 specification and review

      12/28/2019
      0
    • How to stop adding someone to Whatsapp Group

      12/24/2019
      0
    • Great Apps and Service 2019

      12/21/2019
      0
  • Apple
    • The story of Jobs and Ipod

      11/16/2020
      0
    • Jobs firing and return to Apple Inc

      10/09/2019
      0
    • Apple iPad 2018 Vs iPad 2017

      03/29/2018
      0
  • Computer
    • JIO starts 5G service in India next year:Mukesh Ambani

      12/08/2020
      0
    • How to enable WhatsApp 'Disappearing Messages' feature

      11/19/2020
      0
    • What is data Analyst and Scope?

      11/08/2020
      0
    • What is for Looping in C?

      09/29/2020
      0
    • Which is the first program language from Bill Gates

      09/20/2020
      0
    • Tiktok rival launched by Youtube

      09/16/2020
      0
    • Which is the first video Conferencing App In the World

      08/23/2020
      0
    • What are the Retan Tata's Investments in Startups

      08/13/2020
      0
    • What are Chinese Social Media Applications

      07/14/2020
      0
  • Contact Us
Computer
Home›Computer›LET US STUDY C PROGRAMMING 2 Variables,keywords

LET US STUDY C PROGRAMMING 2 Variables,keywords

By fazilmuhammed
04/20/2020
576
0
Share:

Types of C Variables

In C a quality which may vary during program execution is called a variable. Variable name are names given locations in the memory of computer where different constants are stored. These locations can contain integer, real or character constant. In any language the types of variables that it can support depends on the types of constants that it can handle. This is because a constant stored in a location with a particular types of variable name can hold only that type of constant. For example a constant stored in a memory location with an integer variable name must be an integer constant,one stored in location with a real variable name must be real constant and the one stored in location with a character variable name must be a character constant.

The rules for constructing different types of constants are different However for constructing variable name of all types the same set of rules apply

Rules for constuting variable names

  1. A variable name is any combination of 1 to 8 alphabets,digit or underscore. Some compilers allow variable name whose length could be up to 40 characters.
  2. The first character in the variable name must be an alphabet.
  3. No commas or blanks are allowed within a variable name.
  4. No special sympol other than underscore can be used in a variable name

Ex:si_int

An_e_2020

Variable types

  • Local variable

Local variables are declared within the body of a function, and can only be used within that function.

  • Static variable

Another class of local variable is the static type. It is specified by the keyword static in the variable declaration.

The most striking difference from a non-static local variable is, a static variable is not destroyed on exit from the function.

  • Global variable

A global variable declaration looks normal, but is located outside any of the program’s functions. So it is accessible to all functions.

  • An example

 

int global = 10;                        //global variable

int func (int x)

{

static int stat_var;        //static local variable

int temp;                      //(normal) local variable

int name[50];               //(normal) local variable

……

}

What is C keywords

Keywords are the words whose meaning has already been explained to the C compiler. The keywords canot be used as variable name because if we do we are trying to assign a new meaning to the keyword,which is not allowed by the computer. Some C compilers allow you to construct variable name which is exactly resemble the keywords.

There are 32 keywords available in C Following is the list of keywords in C

auto break case char
const continue default do
double else enum extern
float for goto if
int long register return
short signed sizeof static
struct switch typedef union
unsigned void volatile while
Previous Article

Let us Study C programming 1

Next Article

What the details about Zoom Video Communication ...

0
Shares
  • 0
  • +
  • 0
  • 0
  • 0
  • 0

Related articles More from author

  • Computer

    Highest Paying Tech Jobs

    06/27/2018
    By fazilmuhammed
  • ComputerUncategorized

    Thinks to Know about Java Programming

    04/06/2020
    By fazilmuhammed
  • ComputerUncategorized

    AI courses by GOOGLE

    04/25/2018
    By fazilmuhammed
  • Computer

    What is Bitcoin? Details, History

    12/24/2019
    By fazilmuhammed
  • Computer

    What is Netflix?

    08/08/2018
    By fazilmuhammed
  • Computer

    SOPHIA KSA CITIZEN ROBOT

    11/13/2017
    By fazilmuhammed

Leave a reply Cancel reply

  • Business

    What is franchise Business?

  • AutomobileUncategorized

    MG Cars or Morris Garages

  • Computer

    What is Netflix?

  • Recent

  • Popular

  • Comments

  • JIO starts 5G service in India next year:Mukesh Ambani

    By fazilmuhammed
    12/08/2020
  • How to enable WhatsApp ‘Disappearing Messages’ feature

    By fazilmuhammed
    11/19/2020
  • The story of Jobs and Ipod

    By fazilmuhammed
    11/16/2020
  • What is data Analyst and Scope?

    By fazilmuhammed
    11/08/2020
  • THE UNKNOWN FACTS ABOUT FLIPKART

    By fazilmuhammed
    10/31/2020
  • OPERATING SYSTEM USERS SHARE

    By fazilmuhammed
    07/23/2017
  • WHAT IS BELUGA CAVIAR

    By fazilmuhammed
    07/23/2017
  • BEST SELLING AUTOMOBILES

    By fazilmuhammed
    07/23/2017
  • Rare Stories About Dr. APJ Abdul Kalam

    By fazilmuhammed
    07/26/2017
  • Is it coffee help you live longer?

    By fazilmuhammed
    08/02/2017

Tech News

  • ComputerMobile

    JIO starts 5G service in India next year:Mukesh Ambani

    Jio 5G service will be launch may be in June 2021 said Mukesh Ambani during his keynote at India Mobile Congress 2020.Jio developing affordable android phone. The collaboration with Google ...
  • Computer

    How to enable WhatsApp ‘Disappearing Messages’ feature

    In the new updation of Whatsapp introduced new feature is disappearing message feature. This feature is once enabled, new messages sent in the individual or group chat will disappear after ...
  • Apple

    The story of Jobs and Ipod

    Ipod is the Apple’s one of the creative productive. In the 1990s walkman is the portable music player, but it is bulky. In the time Steve Jobs things 1000 music ...
  • Computer

    What is data Analyst and Scope?

    The data analyst can do the transforming data into information. This will improve knowledge and business. Now data analysis plays a role in making decisions more scientific and helping businesses ...
  • BusinessStartup

    THE UNKNOWN FACTS ABOUT FLIPKART

    1.Flipkart is an Singaporean e-commerce company but the headquartered Singapore (legal domicile) and Operation headquarter Bangalore, Karnataka, India. 2.The company started in the year  Sachin Bansal and Binny Bansal in 2007. 3.The first ...

About Us

Contact Us


  • +919995217791
  • techyget@gmail.com
  • Recent

  • Popular

  • Comments

  • JIO starts 5G service in India next year:Mukesh Ambani

    By fazilmuhammed
    12/08/2020
  • How to enable WhatsApp ‘Disappearing Messages’ feature

    By fazilmuhammed
    11/19/2020
  • The story of Jobs and Ipod

    By fazilmuhammed
    11/16/2020
  • What is data Analyst and Scope?

    By fazilmuhammed
    11/08/2020
  • OPERATING SYSTEM USERS SHARE

    By fazilmuhammed
    07/23/2017
  • WHAT IS BELUGA CAVIAR

    By fazilmuhammed
    07/23/2017
  • BEST SELLING AUTOMOBILES

    By fazilmuhammed
    07/23/2017
  • Rare Stories About Dr. APJ Abdul Kalam

    By fazilmuhammed
    07/26/2017

Follow us

© Copyright TECHGETZ. All rights reserved.