Programming for NOOBS

 

Hola NOOBS! WELCOME TO LA CASA DE COMPUTING.

TODAY WE SHALL BE LOOKING AT THE DEFINITION OF PROGRAMMING.

Programming is writing pieces of codes in high-level machine languages such

as java, c++, etc, commanding the computer to do a specific task. For example,

You want to print a heart pattern for your girlfriend. So, you opened an IDE,

wrote relevant codes, and sent the file to your girlfriend. If everything goes well,

and you finally print the heart pattern then voilĂ ! you just proved to her that you

are not worthless.

What is the necessity of programming?

Not just impressing your girlfriend. You can create applications, software, develop

any software, and the best part you can create games. All those GTA games and

CS: GO you play, those are nothing but lines of codes working in unison to provide

you with a friendly gaming experience.

Everything digital in this world comprises 0s and 1s. Means switch on or off. Now

isn’t that mind-blowing?

To master programming, you need to have a firm knowledge of data structures and

algorithms, which will be discussed later.

 

C variable

A Variable also called identifier is a location where data is stored. Can be thought

of as a box to store data.

There are three types of variables:

·        Variables that store one data at a time. Example: integer, character or pointer

variables

·        Variables that store more than one data of similar type. Example: arrays

·        Variables that store dissimilar types of data at a time. Example:  union, structure.

 

Properties of c variable:

·        Two variables can’t share the same name with same visibility

·        If they share the same name then visibility has to be different

Identifier naming rule

·        Only alphabets, digits, and underscore are allowed. Ex. Ksd46 = valid. Avg Val = error

·         The first character must be an underscore or an alphabet. Ex. _name = valid. 8_fad = invalid

·         The name of the variable cannot be any keyword of the programming language. 

        Name of an identifier cannot be a global identifier.

       Only 32 characters are significant in the identifier name.

       Identifier name is case sensitive.

Comments

Popular Posts