DEV Community

madina1575
madina1575

Posted on

Standart turdagi kod ta'rifi

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World" << endl;

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Aynan shu kodlar har bir kod yozish uchun mo'jallangan platformada tayyor yozilgan bo'ladi.
Hozir biz har bir qator va kodlarga ta'rif beramiz:

#include <iostream>
birinchi #include:

  • kodga kerakli kutubxonalarni qo'shish uchun ishlatiladi;

  • compilation jarayonida bizni kodimizga tayyor kutubxonalarni ulab chiqadi;

  • ulash jarayoni esa linking deb nomlanadi;
    <iostream>:

  • iostream kutubxona va u ma'lumotni kiritish va chiqarish imkonini beradi;

  • input/output stream - kiritish/chiqarish oqimi;

  • cout komandasi iostream kutubxonasidan keladi;

  • console out -> consolega chop etish degan ma'noni bildiradi;

Image description

namespace:

nomlar uchun maxsus hudud

  • Bir necha kutubxona ichida bir xil nomli komandalar bo'lishi mumkin;

  • ularni maxsus hududlarga o'rash orqali farqlab ishlatsa bo'ladi;

  • bu hudud esa namespace deb nomlanadi;

Image description

std:: vs using namespace std;

Image description

Image description

`

int main()

`

  • bu funksiya dasturga kirish eshigi hisoblanadi;

  • barcha kod shu funksiya hududida {} belgilar orasida yoziladi;

  • usiz dastur ishga tushmaydi;

cout

  • consolega ma'lumotni chop etish uchun ishlatiladi;

  • console - bu hakerlar ishlatadigan qora oynacha!?!
    -cout komandasidan keyin << (insertion\kiritish) operatori orqali ma'lumot consolega uzatiladi;

cout << "Salom Dunyo" ;

  • bir nechta ma'lumotlarni bittada uzatib chop etsa bo'ladi;
    cout << "Salom" << " dunyo ";

  • C++ tilida ma'lumotlarni tekst ko'rinishi qo'shtirnoq "" orasida yoziladi;

  • tekst ma'lumotlar string deb ataladi;

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay