Skip to main content

How to start learning Web-development

What's the difference between comment line and code line?

Difference between Comment line and code line -

Here we first discussed about comment line according to C/C++ language so lets start 

Comment line -

we use comment for easily explanation any source code we use it for programmer readability and for better understanding these comment are not include in our code or say not counted in our code there are two type of comment -
1. Single line comment : In single line comment we use it for one line comment and the representation of the comment is ' / single line comment/ ' .

Syntax -

// This is Syntax of single line comment
// Here program start
#include<stdio.h>
int main(){
printf("hello world");
}

2. Multiline comment : It is used to comment in multiline code and the representation of the comment is    ' /*Multiline comment */ '

Syntax -  
/*This is multiline comment and we use it when we explaining something in many line so we use this comment */
/*Here is the program syntax*/
#include<stdio.h>

int main(){
printf("hello world");

}

Code line -

The meaning of code line is we use it for instruction our machine and one line of source is may generate one line of instruction for computer which computer understand  and given below one example of code are present which add , subtract , multiple and divide for your understanding for code 

PROGRAM -
//Adding two number
#include <iostream>
using namespace std;
int main()
{
int x, y, z;
cout << "Enter value of x =";
cin >> x;
cout << "Enter value of y =";
cin >> y;
//Addition of two number
cout << "Addition of Two Number"<< "\n";
z = x + y;
cout << z << "\n";
//Subtraction two number
cout << "subtraction of Two Number"<< "\n";
z = x - y;
cout << z << "\n";
//Multiplication two number
cout << "Multiplication of Two Number" << "\n";
z = x * y;
cout << z << "\n";
//Division of two number
cout << "Division of Two Number" << "\n";
z = x / y;
cout << z << "\n";

return 0;
}

Output -
Enter value of x =12
Enter value of y =12
Addition of Two Number      
24
subtraction of Two Number   
0
Multiplication of Two Number
144
Division of Two Number      
1

Code at end of  line -

We can create a comment at the end of code line but we have to comment before the line in code.

#include<stdio.h>

int main(){
printf("hello world"); // comment after the line
}

Different topic from this topic -


Why coding is important ??

This is a very big question in mind of every first year student why it is important to learn this language reason behind this languages is after learning this student can understand the machine language because computer can understand only machine language and this programming languages convert our  in machine languages with the help of coding we make software , website many more thing so you have to think about it 

coding is a very important and how to start coding you have to learn many languages like c , c++ , html , css , Javascript ,java, python , kotlin these languages have there particular work like if we learn kotlin then we make mobile application and if we learn html and css then we make website etc these are the benefit of learning programming languages 

Comments

Popular posts from this blog

Why we learn REACT JS in web development

 REACT JS in web development - why we use it ? we learn REACT JS in web development because it help us to write less code and make more efficient  website because it divide code into many component which was which help us to to write less code and make more efficient work in less time you can say it is time saver if you don't want to write code from base or say scratch react js is reliable for us and very efficient for web development . What is Component means ? The meaning of component is you say in simple language is react divide the code of website let say if we want to make a website and we want to use a code repeatly so we have to write the again and again but if you was use component you have to write code at ones and use it by import it again and again you can work very efficiently and fast  What we have to do in react  In react we have to convert html form language into JSX form language and if you think how we can do this so their is many option are availabl...

Code of HTML and CSS how we take color , border , etc

  code of HTML and CSS - 1. How we take change color in css (color and border both property) code - <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>color in css</title> <style> .color1{ background-color: green; } .color2{ color: yellow; } .color3{ border: 2px solid red; } </style> </head> <body> <!-- lets take paragarph --> <p class="color1"> In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed </p> <p class="color2"> In display property if we apply inline-blo...

AFTER 12th WHAT ? EVERY 12th MATHS STUDENT QUESTION

AFTER 12 th  WHAT ? EVERY 12 th  MATHS STUDENT QUESTION After 12 th  every math / science student have a questionwhat we have to do or not do so, here we have some answer for those student who want to enjoy their vacation and want to study something new interesting so here we have some new work for them Student who wants to go in CSE(computer science engineering ) then they can learn coding from home in vacation after 12 th  so in 1 st  year it will help him after 12 th  CSE student go to learn C/C++,PYTHAN,JAVA,JAVA(SCRIPT),etc languages & many more languages which are available at online on youtube many people are making free video for student which are very helpful    for them .   Why students learn these languages ? This is a very big question in mind of every 1 st  year student why it    is important to learn this language . reason behind this languages is after learning then student can understand the machine language...