SIZ Approved Course || COMPUTER PROGRAMMING -BASIC SYNTAX || Lecture 3 || 20% pay out to siz-official

in Steem Infinity Zone3 years ago

Assalma-o-Alaikum!

Greeting to all steemmians. Hope fully that you all are fine and enjoying a great work on STEEMIT. I know that you all are so talented and I really appreciate your work. So keep it up. And continue your informative posts

Well Today I wanna share my Lecture 3 that is about Computer Programming. And the main topic is:

Programming Basic Syntax

So Lets' Started:

So now let's start with a little coding that really gives you a computer programmer. We are going to write a single line computer program to write Hello World. Let's see how we can get the result and what will be the result

Hello World in C program:

I also suggest that by using www.cimpileonline.com try different examples using them

And the way to do that is to try to change the material inside the printf()

That is, type anything in place of Hello World and then check the result. It only prints what you put within two double quotes.

#include <studio.h>
Int main()
{
/
printf() function to write Hello, world! /
Printf(“ My username is, @arinaz08”);
}

Which Produces following result
My username is,@arinaz08

This little example will help us to understand different basic concepts from username program of C programming. And you can see my this example that is related to this example

image.png

image.png

Program Entry Point:

For now S just forget about #include studio.h , but remember one note that you must keep this statement at the top of the C program.
Every C program have to be start with main() which is called main function. And then have to be followed curly brackets.
And remember that the same bracket that we will use on the upper side must be removed at the end of the program.
The program written between the two brackets is the program body and program just written in curly brackets
Left bracket is written where the main function main(){ is written and right bracket is written when the program ends

image.png

Functions:

Function programs are small units that are used to perform a specific task.
For Example if program uses two functions
1.Main()
2.Printf()

Here main() funcyion is used for entry point in the program execution. And prinf() is used to print the funcytion that we want to display on screen.

You can write functions as separate but C programming itself provides different built in functions as we use in our programs according to our need.
Some programming languages use the word subroutine instead of function but their performance is the same.

image.png

Comments:

  • The C program can include statements and these type of statements are called comments

  • And these comments are used to make the program easier to understand

  • The good thing about comments is that the Interpreter and compiler have completely ignored them so you want to use your language

image.png

WhiteSpaces:

When we write a program using a programming language, we use different printable characters to create programming statements
And these are:
A,b,c,…..,z,A,B,C,………,Z,1,2,3,…….,0,@,#,%,^,&,*,-,=,+,?,/,!,(,),[,],{,},|,,;,”,<,>,etc

There are some other characters that we use a lot but they are hidden in your program. And these are:
Spaces

  • Tabs (/t)
  • New lines(/n)

And these are also called whitespaces

Here are three spaces cricketers that are widely used in programming but invisible in program result program

WhiteSpaceExplianationRepresentation
New LineTo create a new line\n
TabTo create a tab\t
SpaceTo create a spaceempty space

I will show you an example of empty spaces

image.png

image.png

So here it ignore the white spaces.

image.png

Now its end of my lecture 3 . And I hope that you will understand it clearly. And give me feedback also

Here is my Lecture 1

Here is my Lecture 2

20% pay out to siz-official

Special Thanks to:
@cryptokraze
@siz-official
@vvarishayy
@suboohi
@qasimwaqar

Subscribe Steem Infinity Zone:

image.png

Regards:@arinaz08

Sort:  
 3 years ago 

Good one Post dear friend you make a very good post thanks for sharing a good information with us my best wishes for you.

Regards, Faran Nabeel

 3 years ago 

Thanks for your kind words. May Allah bless you. Ameen

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 62102.31
ETH 2432.92
USDT 1.00
SBD 2.67