-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3848f0d
commit d143cde
Showing
25 changed files
with
1,833 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# C Programming Language | ||
|
||
## What is C | ||
|
||
|
||
C is a general-purpose programming language created by Dennis Ritchie in the early 1970s at Bell Labs. It's a major language in computer programming and is still widely used. | ||
|
||
C ek general-purpose programming language hai jo 1970s ke early years mein Dennis Ritchie ne Bell Labs (AT&T's research and development facility) mein develop ki. Yeh language computer programming ki duniya mein ek landmark hai aur aaj bhi widely used hai. Yahan C ki kuch key aspects hain: | ||
|
||
### Features of C | ||
|
||
- **General-Purpose**: | ||
|
||
- C ek versatile language hai jo various types of programming tasks ke liye use hoti hai, jaise system programming, application programming, aur embedded systems. | ||
|
||
- Used for system programming, application development, and embedded systems. | ||
|
||
- **Structured Programming**: | ||
|
||
- C language structured programming ko support karti hai. Iska matlab hai ki aap code ko functions mein divide kar sakte hain, jisse ki code ko organize aur manage karna aasan ho jata hai. | ||
|
||
- Allows organizing code into functions, making it easier to manage. | ||
|
||
- **Low-Level Access**: | ||
|
||
- C pointers aur direct memory access ki suvidha deti hai, jo system programming aur hardware interaction ke liye zaroori hoti hai. | ||
|
||
- Supports pointers and direct memory access for system-level programming. | ||
|
||
- **Efficiency**: | ||
|
||
- C ki design aur syntax isse efficient aur fast programming banati hai. Yeh language low-level operations aur high performance ko support karti hai. | ||
|
||
- Fast and efficient, suitable for low-level operations. | ||
|
||
- **Portability**: | ||
|
||
- C ke programs ko alag-alag systems par run kiya ja sakta hai, kyunki C ke code ko standard libraries aur compiler ke through different platforms ke liye adjust kiya ja sakta hai. | ||
|
||
- Code can run on different systems with minimal changes. | ||
|
||
- **Rich Set of Operators**: | ||
|
||
- C mein arithmetic, logical, aur bitwise operators hain, jo data manipulation ko flexible aur powerful banate hain. | ||
|
||
- Includes arithmetic, logical, and bitwise operators for flexible data manipulation. | ||
|
||
- **Standard Library**: | ||
|
||
- C ek comprehensive standard library provide karti hai, jo various functions aur tools ke set ko include karti hai, jaise input/output operations aur memory management. | ||
|
||
|
||
- Provides a wide range of functions for tasks like I/O operations and memory management. | ||
|
||
- **Syntax**: | ||
|
||
- C ka syntax simple aur easy-to-learn hai, aur yeh widely adopted conventions aur practices ko follow karta hai. Iska syntax C++ aur Java jaisi modern languages ko influence karta hai. | ||
|
||
- Simple and influences other modern languages like C++ and Java. | ||
|
||
## History of C | ||
|
||
- **BCPL (Basic Combined Programming Language)**: | ||
- **Vikas**: | ||
|
||
|
||
- BCPL ko Martin Richards ne 1966 mein develop kiya tha. Yeh ek simple aur flexible programming language thi jo system programming ke liye design ki gayi thi. Iska primary goal tha system-level programming aur compiler writing ko asaan banana. BCPL ne programming ko simplify kiya aur system software development ke liye ek foundational language provide ki, jisse zyada efficient aur manageable code likha ja sake. | ||
|
||
|
||
- Developed by Martin Richards in 1966, it was designed to simplify system-level programming. | ||
|
||
- **B Language**: | ||
- **Vikas**: | ||
|
||
- Ken Thompson aur Dennis Ritchie ne late 1960s mein B language develop ki. Ken Thompson ko programming languages mein simplicity aur efficiency bahut pasand thi. B language ko design karte waqt, unhone BCPL ki simplicity aur flexibility ko dhyan mein rakha. B ko bhi system programming ke liye design kiya gaya tha, lekin isme BCPL ki complexity ko streamline kiya gaya. Yahan "streamline" ka matlab hai ki B language ne BCPL ke features ko simplify aur optimize kiya, jisse code likhna aur manage karna aur bhi aasan ho gaya. B ka design minimal tha, matlab isme sirf woh features the jo essential the, jisse code likhna aur manage karna aasan ho jaye. Yeh design early computers ke limited resources ke liye ideal tha, kyunki yeh lightweight aur efficient tha. | ||
|
||
|
||
- Developed by Ken Thompson and Dennis Ritchie in the late 1960s, B was a simplified version of BCPL, aimed at system programming but with fewer features. | ||
|
||
- **Limitations**: B language ne system programming ke field mein ek important role play kiya, lekin isme kuch limitations thi. Yeh limitations primarily type checking aur structured programming ke features ki kami se related thi. Type checking ka matlab hai ki programming languages mein variables aur expressions ke data types ko validate karna, taaki type errors avoid kiye ja sakein. B language mein type checking ka support nahi tha, jo programming errors ko detect karne aur prevent karne mein ek important feature hai. | ||
|
||
- **C Language**: | ||
- **Vikas**: | ||
|
||
- Dennis Ritchie ne B language ke limitations ko address karte hue C language develop ki. C language ne B ki simplicity ko maintain karte hue, usme additional features aur control add kiya, jisse ki complex system software aur applications develop kiya ja sake. C ne structured programming, better type checking, aur advanced features ko introduce kiya, jo modern programming needs ke liye zyada suited the. C language ne programming community mein ek significant impact dalha aur aaj bhi widely used hai. | ||
|
||
- Dennis Ritchie developed C to address B’s limitations, adding features like type checking and structured programming. C maintained B’s simplicity while introducing enhancements, making it well-suited for complex programming tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include<stdio.h> // Include standard input/output library | ||
|
||
|
||
int main(){ | ||
|
||
printf("Hello World"); // Print the result to the console | ||
return 0; // End of the program | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# What is Docker? | ||
|
||
|
||
- Docker is an open-source platform that automates the process of building, shipping, and running applications using containerization technology. Containers allow developers to package an application with all its dependencies, ensuring that it runs consistently across different computing environments. Docker simplifies the development lifecycle by providing a standardized and efficient way to manage application dependencies and runtime environments. | ||
|
||
|
||
|
||
- Docker ek open-source platform hai jo applications ko lightweight aur portable containers ke andar deploy karne ko automate karta hai. Containers aise packages hain jo ek application aur uski saari dependencies ko encapsulate karte hain | ||
|
||
|
||
- "encapsulate" ka matlab hai ki ek container application aur uski saari dependencies (libraries, configuration files, etc.) ko ek single package mein pack kar deta hai. Isse application aur uske dependencies ek isolated environment mein hoti hain , | ||
|
||
|
||
|
||
|
||
- "Isolated" ka matlab hai ki container apna ek alag aur separate environment provide karta hai. Iska matlab hai ki container ke andar jo bhi chal raha hai, wo baaki system ya doosre containers se alag hota hai. Agar container ke andar koi problem aati hai, to wo baaki containers ya host system ko affect nahi karegi. | ||
|
||
- Docker development, testing, aur deployment workflows ko simplify karta hai by providing an isolated aur reproducible environment for applications. | ||
|
||
|
||
|
||
`Isolation Example` | ||
|
||
|
||
- Isolated Containers: Jab aap Express aur MongoDB ko Docker containers mein run karte hain, to dono containers apne-apne isolated environments mein chalte hain. Express container sirf apne environment mein run karta hai aur MongoDB container apne environment mein run karta hai. Agar Express container ko koi problem hoti hai, to wo MongoDB container ya host system ko affect nahi karegi, aur vice versa. | ||
|
||
- Communication: Dono containers ek Docker network ke through communicate kar sakte hain. Isse Express container MongoDB container se data fetch kar sakta hai, lekin dono containers ek dusre se isolated hain, jisse system ki stability aur security improve hoti hai. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*node_modules* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import express from 'express'; | ||
const app = express(); | ||
import userRoutes from './src/routes/user.js'; | ||
|
||
import routesMiddleware from './src/middleware/Routes.js' | ||
|
||
app.use(express.urlencoded({ extended : true })) | ||
|
||
app.use(express.json()) | ||
|
||
app.set('view engine' , 'ejs') | ||
|
||
// Use the configured routes | ||
app.use(routesMiddleware); // Mount the routes at the root path | ||
|
||
app.get('/', (req, res) => { | ||
// res.send('Welcome to the app!'); | ||
|
||
res.redirect('/user') | ||
}); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
let port = 5000; | ||
|
||
app.listen(port , (err)=>{ | ||
console.log(`Server listen on http://localhost:${port}`) | ||
}) |
Oops, something went wrong.