bsc

Comprehensive codebase and cou...
Log | Files | Refs | README | LICENSE

commit 9a1ea28d0482dbc18c5c874a7f3bdf8606c88dd8
parent a03f26513edc96fbd572ca03a2cf252a8efc25f1
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Fri,  6 Mar 2026 20:20:52 +0530

[2026-03-06] : .\{root} : ans of paper-1_05-03-2026

Diffstat:
M.vscode/launch.json | 6+++---
ASemester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-10.c | 46++++++++++++++++++++++++++++++++++++++++++++++
ASemester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-8.c | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ASemester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-9.c | 43+++++++++++++++++++++++++++++++++++++++++++
Mdeploy_pipeline.py | 5+----
Mdocs/index.html | 224+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 378 insertions(+), 7 deletions(-)

diff --git a/.vscode/launch.json b/.vscode/launch.json @@ -8,10 +8,10 @@ "args": [], "stopAtEntry": false, "externalConsole": true, - "cwd": "g:/bsc/tution-c", - "program": "g:/bsc/tution-c/build/Debug/outDebug", + "cwd": "${fileDirname}", + "program": "${fileDirname}/${fileBasenameNoExtension}.exe", "MIMode": "gdb", - "miDebuggerPath": "gdb", + "miDebuggerPath": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", diff --git a/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-10.c b/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-10.c @@ -0,0 +1,46 @@ +/* + * Author : Amit Dutta <amitdutta4255@gmail.com> + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find the maximum element in each row of a 2D +array and print the result. */ + +#include <stdio.h> + +void findMax(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + arr[i][j] = val++; + } + } + findMax(row, col, arr); + return 0; +} + +void findMax(int row, int col, int arr[row][col]) +{ + int i, j; + int max; + for (i = 0; i < row; i++) + { + max = arr[i][0]; + for (j = 0; j < col; j++) + { + if(max < arr[i][j]) { + max = arr[i][j]; + } + } + printf("Max of row %d = %d\n", i, max); + } +} diff --git a/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-8.c b/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-8.c @@ -0,0 +1,60 @@ +/* + * Author : Amit Dutta <amitdutta4255@gmail.com> + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find the transpose of a given square matrix using 2D array. +The transpose of a matrix is obtained by swapping the rows and columns of the matrix */ + +#include <stdio.h> + +void transpose(int row, int col, int[row][col]); +void print(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + arr[i][j] = val++; + } + } + printf("Before Transpose: \n"); + print(row, col, arr); + transpose(row, col, arr); + return 0; +} + +void transpose(int row, int col, int arr[row][col]) +{ + int i, j; + int res[col][row]; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + res[j][i] = arr[i][j]; + } + } + printf("\nAfter Transpose: \n"); + print(row, col, res); +} + +void print(int row, int col, int arr[row][col]) +{ + int i, j; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + printf("%d ", arr[i][j]); + } + printf("\n"); + } +}+ \ No newline at end of file diff --git a/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-9.c b/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-9.c @@ -0,0 +1,42 @@ +/* + * Author : Amit Dutta <amitdutta4255@gmail.com> + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find sum of all elements in a given 2D array. */ + +#include <stdio.h> + +int findSum(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + arr[i][j] = val++; + } + } + printf("Sum: %d", findSum(row, col, arr)); + return 0; +} + +int findSum(int row, int col, int arr[row][col]) +{ + int i, j; + int sum = 0; + for (i = 0; i < row; i++) + { + for (j = 0; j < col; j++) + { + sum += arr[i][j]; + } + } + return sum; +}+ \ No newline at end of file diff --git a/deploy_pipeline.py b/deploy_pipeline.py @@ -303,10 +303,7 @@ def main(): sync_bsc_local() - if index_changed: - update_and_push_aranag() - else: - print("\n[Skip] Index unchanged. Skipping G:\\aranag update.") + # removed the auto git upload for the main website folder. print("\n=== PIPELINE FINISHED ===") diff --git a/docs/index.html b/docs/index.html @@ -372,6 +372,230 @@ <svg class="folder-icon w-5 h-5 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" /> </svg> + <span class="font-medium text-slate-700 group-hover:text-blue-600 transition-colors">EduInCS Exam</span> + </div> + <div class="hidden pl-4 mt-1 border-l-2 border-slate-100 ml-3.5"> + + <div class="folder-container mb-2"> + <div class="flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-slate-100 rounded-lg transition-colors group select-none" onclick="toggleFolder(this)"> + <svg class="chevron w-4 h-4 text-slate-400 transition-transform duration-200" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> + </svg> + <svg class="folder-icon w-5 h-5 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" /> + </svg> + <span class="font-medium text-slate-700 group-hover:text-blue-600 transition-colors">Paper-1_05-03-2026</span> + </div> + <div class="hidden pl-4 mt-1 border-l-2 border-slate-100 ml-3.5"> + + <div class="file-item flex items-center justify-between px-3 py-2 hover:bg-white hover:shadow-sm rounded-lg transition-all group border border-transparent hover:border-slate-100 mb-1"> + <div class="flex items-center gap-2.5 min-w-0 cursor-pointer flex-1" onclick="showCode('code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-10-c', 'Qn-10.c', 'https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-10.c')"> + <svg class="w-4 h-4 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> + </svg> + <span class="text-sm text-slate-600 font-medium group-hover:text-blue-600 truncate">Qn-10.c</span> + </div> + <div class="flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity"> + <a href="https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-10.c" target="_blank" class="p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-100 rounded-md" title="View on GitHub"> + <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-2.126 1.029-2.935-.103-.253-.446-1.372.097-2.897 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.525.202 2.644.1 2.897.64.809 1.026 1.841 1.026 2.935 0 3.847-2.337 4.687-4.565 4.935.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"></path></svg> + </a> + </div> + <!-- Embedded Code Storage --> + <div id="code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-10-c" style="display:none;">/* + * Author : Amit Dutta &lt;amitdutta4255@gmail.com&gt; + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find the maximum element in each row of a 2D +array and print the result. */ + +#include &lt;stdio.h&gt; + +void findMax(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + arr[i][j] = val++; + } + } + findMax(row, col, arr); + return 0; +} + +void findMax(int row, int col, int arr[row][col]) +{ + int i, j; + int max; + for (i = 0; i &lt; row; i++) + { + max = arr[i][0]; + for (j = 0; j &lt; col; j++) + { + if(max &lt; arr[i][j]) { + max = arr[i][j]; + } + } + printf(&quot;Max of row %d = %d\n&quot;, i, max); + } +} +</div> + </div> + + <div class="file-item flex items-center justify-between px-3 py-2 hover:bg-white hover:shadow-sm rounded-lg transition-all group border border-transparent hover:border-slate-100 mb-1"> + <div class="flex items-center gap-2.5 min-w-0 cursor-pointer flex-1" onclick="showCode('code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-8-c', 'Qn-8.c', 'https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-8.c')"> + <svg class="w-4 h-4 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> + </svg> + <span class="text-sm text-slate-600 font-medium group-hover:text-blue-600 truncate">Qn-8.c</span> + </div> + <div class="flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity"> + <a href="https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-8.c" target="_blank" class="p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-100 rounded-md" title="View on GitHub"> + <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-2.126 1.029-2.935-.103-.253-.446-1.372.097-2.897 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.525.202 2.644.1 2.897.64.809 1.026 1.841 1.026 2.935 0 3.847-2.337 4.687-4.565 4.935.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"></path></svg> + </a> + </div> + <!-- Embedded Code Storage --> + <div id="code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-8-c" style="display:none;">/* + * Author : Amit Dutta &lt;amitdutta4255@gmail.com&gt; + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find the transpose of a given square matrix using 2D array. +The transpose of a matrix is obtained by swapping the rows and columns of the matrix */ + +#include &lt;stdio.h&gt; + +void transpose(int row, int col, int[row][col]); +void print(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + arr[i][j] = val++; + } + } + printf(&quot;Before Transpose: \n&quot;); + print(row, col, arr); + transpose(row, col, arr); + return 0; +} + +void transpose(int row, int col, int arr[row][col]) +{ + int i, j; + int res[col][row]; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + res[j][i] = arr[i][j]; + } + } + printf(&quot;\nAfter Transpose: \n&quot;); + print(row, col, res); +} + +void print(int row, int col, int arr[row][col]) +{ + int i, j; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + printf(&quot;%d &quot;, arr[i][j]); + } + printf(&quot;\n&quot;); + } +}</div> + </div> + + <div class="file-item flex items-center justify-between px-3 py-2 hover:bg-white hover:shadow-sm rounded-lg transition-all group border border-transparent hover:border-slate-100 mb-1"> + <div class="flex items-center gap-2.5 min-w-0 cursor-pointer flex-1" onclick="showCode('code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-9-c', 'Qn-9.c', 'https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-9.c')"> + <svg class="w-4 h-4 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /> + </svg> + <span class="text-sm text-slate-600 font-medium group-hover:text-blue-600 truncate">Qn-9.c</span> + </div> + <div class="flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity"> + <a href="https://github.com/notamitgamer/bsc/blob/main/Semester_1/EduInCS Exam/Paper-1_05-03-2026/Qn-9.c" target="_blank" class="p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-100 rounded-md" title="View on GitHub"> + <svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-2.126 1.029-2.935-.103-.253-.446-1.372.097-2.897 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.525.202 2.644.1 2.897.64.809 1.026 1.841 1.026 2.935 0 3.847-2.337 4.687-4.565 4.935.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"></path></svg> + </a> + </div> + <!-- Embedded Code Storage --> + <div id="code-Semester_1-EduInCS-Exam-Paper-1_05-03-2026-Qn-9-c" style="display:none;">/* + * Author : Amit Dutta &lt;amitdutta4255@gmail.com&gt; + * Date : 06 Mar 2026 + * Repo : https://github.com/notamitgamer/bsc + * License : MIT License (See the LICENSE file for details) + * Copyright (c) 2026 Amit Dutta + */ + +/* Write a C program to find sum of all elements in a given 2D array. */ + +#include &lt;stdio.h&gt; + +int findSum(int row, int col, int[row][col]); + +int main() +{ + int row = 3, col = 3, i, j, val = 1; + int arr[row][col]; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + arr[i][j] = val++; + } + } + printf(&quot;Sum: %d&quot;, findSum(row, col, arr)); + return 0; +} + +int findSum(int row, int col, int arr[row][col]) +{ + int i, j; + int sum = 0; + for (i = 0; i &lt; row; i++) + { + for (j = 0; j &lt; col; j++) + { + sum += arr[i][j]; + } + } + return sum; +}</div> + </div> + + </div> + </div> + + </div> + </div> + + <div class="folder-container mb-2"> + <div class="flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-slate-100 rounded-lg transition-colors group select-none" onclick="toggleFolder(this)"> + <svg class="chevron w-4 h-4 text-slate-400 transition-transform duration-200" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> + </svg> + <svg class="folder-icon w-5 h-5 text-blue-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" /> + </svg> <span class="font-medium text-slate-700 group-hover:text-blue-600 transition-colors">assignment-primary</span> </div> <div class="hidden pl-4 mt-1 border-l-2 border-slate-100 ml-3.5">
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror