diff --git a/docs/day-02/comments-in-cpp.md b/docs/day-02/comments-in-cpp.md index 7015dcd7..3f4aab9a 100644 --- a/docs/day-02/comments-in-cpp.md +++ b/docs/day-02/comments-in-cpp.md @@ -8,11 +8,12 @@ slug: comment-in-cpp -1. What is Comment in C++? +## 1. What is Comment in C++? - A comment in C++ is a programmer-readable note that is inserted directly into the source code of a program. - Comments are ignored by the compiler and are meant for the programmer’s use only. - They serve as a form of in-code documentation, helping developers understand the purpose, logic, or explanation behind specific code lines -2. Why do we use comments in C++? + +## 2. Why do we use comments in C++? Comments serve several purposes: - Explanation: They explain the code, making it more readable and understandable for other programmers. - Debugging: Comments can be useful for debugging by providing context or temporarily disabling code segments. @@ -21,7 +22,7 @@ Comments serve several purposes: ![comment-in-cpp](../../static/img/day-02/comment-in-cpp.png) -3. Write a simple program to demonstrate the use of comments in C++. +## 3. Write a simple program to demonstrate the use of comments in C++. ```cpp #include using namespace std; @@ -33,7 +34,8 @@ int main() { } ``` In this program, we use both single-line comments (//) to explain the code and prevent execution of those comment lines -4. Types of comments in C++ + +## 4. Types of comments in C++ i. Single Line Comment - Starts with // and applies to a single line only. - Compiler ignores any text after //. diff --git a/docs/day-07/function-in-cpp.md b/docs/day-07/function-in-cpp.md index cc612e48..69a910b5 100644 --- a/docs/day-07/function-in-cpp.md +++ b/docs/day-07/function-in-cpp.md @@ -1,3 +1,4 @@ +--- sidebar_position: 3 title: "Function in C++" description: "In this tutorial, we will learn about functions in C++ programming with the help of examples. A function is a block of code that performs a specific task. It is used to break the code into smaller modules that can be reused." diff --git a/src/pages/index.js b/src/pages/index.js index 193ef806..2d56b133 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -18,13 +18,11 @@ function HomepageHeader() { {siteConfig.title} - main

{siteConfig.tagline}

{siteConfig.tagline}

- main
- main
- +
- main
@@ -66,7 +62,7 @@ export default function Home() { ); } - +