Function Declaration in C++

https://youtu.be/WS9IabM4Vtw?si=pSq5hHz-tCWLEQf8 #include <iostream> using namespace std; void myfunc(); int myfunc2(int x); int myfunc3(int x, int y); int myfunc4(int, int); int main() { return 0; }

Constants in C++

https://youtu.be/8AHr5AbR9pg #include <iostream> using namespace std; int main() { const int y; const int x = 10; int myArr[x] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};…

String Input in C++

https://youtu.be/8Yk0kDvr5ro?si=lOi9bvpeaVg7n3rP #include <iostream> #include <string> using namespace std; int main() { string str; cout << "Please enter a string: "; getline(cin, str); cout << "You entered: " << str; return…

The memccpy Function in C Language

https://youtu.be/UAZg1azWYoM?si=Gd0Ip6PbOHC4hkT7 #include <stdio.h> #include <string.h> int main(void) { const char src[] = "Copy until @ is found."; char dest[sizeof src]; const char stop_char = '@'; void *ptr = memccpy(dest, src,…

The #if directive in C

https://youtu.be/4vS3vJNJsog #include <stdio.h> #define FLAG 150 int main() { #if FLAG < 150 printf("This will not get compiled\n"); #elif FLAG == 150 printf("This will get compiled\n"); #else printf("This one will…

#define directive in C

https://youtu.be/QpYbTZfGtG0?si=ObXJy_8ZWNgQPchj #include <stdio.h> #define ARRAY_ELEMENTS 3 int main() { int myarr[ARRAY_ELEMENTS]; myarr[0] = 50; myarr[1] = 100; myarr[2] = 200; for (int i = 0; i < ARRAY_ELEMENTS; i++) {…