https://news.1rj.ru/str/+fVJ4fVFeyhI0OWY0
Join for better communication about Programming and Software development in General!🧠
Please open Telegram to view this post
VIEW IN TELEGRAM
Telegram
Cafè Linux Chat
@TCafeLinux Chatroom.
whoami: @firstTarokh -
🕷️
whoami: @firstTarokh -
🕷️
Cafè Linux
int first = 34; int* ptr = first; *ptr = 54; printf("%d\n", first);
Will this code execute ?
Anonymous Quiz
41%
Yes
37%
No - Compile Error
22%
Yes - Undefined Behaviour
void main() {
int nums[] = {1, 2, 3, 4, 5};
int size = sizeof(nums)/sizeof(nums[0]);
int* ptr = &nums[0];
int* lptr = &nums[size];
while (ptr < lptr) {
printf("%d\n", *ptr);
ptr++;
}
}
Cafè Linux
void main() { int nums[] = {1, 2, 3, 4, 5}; int size = sizeof(nums)/sizeof(nums[0]); int* ptr = &nums[0]; int* lptr = &nums[size]; while (ptr < lptr) { printf("%d\n", *ptr); ptr++; } }
What is the output of this code ? 😍
Anonymous Quiz
12%
1, 2, 4
36%
1, 2, 3, 4, 5
36%
Compiler Error
7%
NULL
10%
0
int main() {
int nums[] = {1, 2, 3, 4, 5};
char* ptr = nums;
printf("%d ", *(ptr++));
return 0;
}int main() {
char* first = "I am batman for sure";
char BLUFF[1024];
strcpy(BLUFF, first);
printf("%s\n", BLUFF);
return EXIT_SUCCESS;
}void main() {
char* first = "Jacob";
char* sec = "Jacob";
if (strcmp(first, sec) == 0)
printf("COMPARE TRUE");
else
return EXIT_FAILURE;
return EXIT_SUCCESS;
}
Cafè Linux
void main() { char* first = "Jacob"; char* sec = "Jacob"; if (strcmp(first, sec) == 0) printf("COMPARE TRUE"); else return EXIT_FAILURE; return EXIT_SUCCESS; }
Will this code execute ? What is the answer ?
Anonymous Quiz
66%
Yes! - COMPARE TRUE
6%
No!
13%
Yes - EXIT_FAILURE
15%
No - Compiler Error
دلیل اینکه تست هارو نمیزنید چیه
Anonymous Poll
32%
فیلم هارو ندیدم 🗿
19%
فیلم هارو ندیدم خودمم جدا نخوندم 🗿
10%
حال نمیکنم بزنم 🗿
20%
به تو ربطی نداره 🗿
19%
صبر کن میزنم 🚀
Cafè Linux
Torvalds on C++, C++ is a piece of sh** -.- #cafelinux @tcafelinux
دوستان توجه کنید که این مال 2007 هست،
الان خیلی چیزها تغییر کرده.
الان خیلی چیزها تغییر کرده.
👍3🤡2👎1💯1🆒1
Please open Telegram to view this post
VIEW IN TELEGRAM