Cafè Linux
what is the entry point in a C program ?
main function
Entry point of every C program
Cafè Linux
Will this code compile ?
It will not compile
A void function cannot return anything.
فانکشن void نمیتونه return کنه. کامپایل نمیشه.
Cafè Linux
Will this code compile ? (TRICKY QUESTION)
Yes,
It acts like main is returning int by default, and it compiles with a warning.
کامپایل میشه و main رو اینطوری در نظر میگیره که داره int برمیگردونه . ولی اینطوری کد ننویسید بهتره.
Cafè Linux
Is "something" printed after running the code ?
It will not print because we are returning before it. and return is a sign for the function to exit.
قرار نیست something پرینت بشه چون قبلش return کردیم.
Cafè Linux
Is this code correct ?
On most systems, especially UNIX/Linux, the return value of main() becomes the program's exit status.
so a valid exit code is between 0 to 255 (8-bit Integer)
چون return code فانکشن مین در سیستم های لینوکسی میشه همون exit code برنامه. یه محدودیتی این وسط براش هست :) نمیشه هرچیزی خواستید برگردونید. و رینجش رو بالا نوشتم.
ولی از نظر C اون کد کاملا درسته و صرفا جایی که کد رو ران کردید تاثیر گذاره
Cafè Linux
GREP! With "grep" you have the magic! A separate video will be recorded. با دستور grep میتونید دنبال pattern های خاص بگردید داخل یک فایل - یه ویدیو برای grep رکورد میکنم.
اینم فقط چون الان عرفان از کانال رفت بیرون رکورد میکنم. 🏳️
🤣5💯2
این ویدیوی اول array ها
یه ویدیو دوم یا شاید سوم هم درموردش رکورد میشه
موارد بیشتری هست برای گفتن
❤3
You may use a variable that is defined after it is used... (WRONG). define all the variables at the top of the scope, even if the compiler is silent.
با وجود اینکه این یک استاندارد قدیمی هست که متغیر ها حتما بالای فانکشن و یا اسکوپ مورد نظر تعریف بشن. ولی همچنان پیشنهاد میشه که مثل گذشته برخورد کنید.
❤4
Cafè Linux
https://youtu.be/5RieC0tfM3Q?si=01g2BBnE2GYILtU4
چون ری اکشن های این انقد زیاد بود که تلگرام کرش کرد. گفتم ویدیو بعدی رو هم رکورد کنم
❤9🤣4🤝4
❤4💋3🔥2