From 6e3f02465a318960c7e380af7134679b9d5f6b55 Mon Sep 17 00:00:00 2001 From: Amruta Kothawade <116087736+Amruta7203@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:26:12 +0530 Subject: [PATCH] Altered functions-in-cpp.md (#337) * Update index.js * msg * msg --- docs/day-02/comments-in-cpp.md | 10 ++++++---- docs/day-07/function-in-cpp.md | 1 + src/pages/index.js | 10 +++------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/day-02/comments-in-cpp.md b/docs/day-02/comments-in-cpp.md index 7015dcd7e..3f4aab9ae 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 cc612e480..69a910b5f 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 193ef8069..2d56b1336 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() { ); } - +