+ 1

hi guys i am totally new in this field. please help me by explanations?

what does it mean? %d , int, double #include <stdio.h> int main() { printf("int: %d \n", sizeof(int)); printf("float: %d \n", sizeof(float)); printf("double: %d \n", sizeof(double)); printf("char: %d \n", sizeof(char)); return 0; }

1st Feb 2019, 4:12 PM
Md Sajid
Md Sajid - avatar
1 ответ
+ 9
%d is a format specifier which is used to display integer values of the variables or constant numbers to the console sizeof() operator is used to get the size of particular data type #include <stdio.h> is a library that contain the definitions of functions like printf(), scanf() etc. int main() is the main function of a program which is the entry point of all programs, it compulsory in every program return 0 statement is basically for the compiler, if program executes successfully without any error it returns 0 and if the program has some error it will return 0. You don't need to write this statement.
1st Feb 2019, 5:17 PM
blACk sh4d0w
blACk sh4d0w - avatar