Message from C, C++ discussions

December 2019

— Is it an error or a warning?

— 

Error:

error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
note: см. объявление "scanf"

— It says it pretty clear. Your compiler doesn't like scanf

— Missed a returned value

— Hey guys I already know C language and now I want to extend my knowledge to C++ so which book is best to start learning C++ best in the sense which gives reference and comparision with C and not covering same topic in depth again like pointers, arrays etc..

Message permanent page

— Psst

— Lol why you don't use monospace font

— Void fun(int arr[])
{
int i;
int arr_size = sizeof(arr)/sizeof(arr[0]);
printf("%d\n",sizeof(arr));
printf("%d\n",sizeof(arr[0]));
for (i = 0; i < arr_size; i++)
printf("%d ", arr[i]);
}

int main()
{
int i;
int arr[4] = {10, 20 ,30, 40};
fun(arr);
return 0;
}

Message permanent page

— OUTPUT produces 8 4 and 10 20

— Can someone explain me how 8 is the size of the array

— Wtf

— Don't use sizeof/sizeof