Main main is a name of function which is predefined function in C++ library. You can use only comment after filename otherwise it will give error.So in case of #include, a\nb is treated as filename. In #include directive, backslash is considered as normal text not escape sequence.So in case of #include, a//b is treated as filename. In #include directive, comments are not recognized.Once a user-defined file is written, it can be imported anywhere in the program using the #include preprocessor. This saves the user from writing a particular function multiple times. User-defined files: These files resembles the header files, except for the fact that they are written and defined by the user itself. So to utilise those functions, the users need to import a few header files which define the required functions. Functions like the printf(), scanf(), cout, cin and various other input-output or other standard functions are contained within different header files. Header File or Standard files: This is a file which contains C/C++ function declarations and macro definitions to be shared between several source files. It is mainly used to access system header files located in the standard system directories. Including using : While importing file using angular brackets(), the the preprocessor uses a predetermined directory path to access the file. If any of the conditional expression evaluates to true, then it will execute the corresponding code block and exits whole if-else ladder.A condition expression is tested only when all previous if conditions in if-else ladder is false.It allows us to check for multiple condition expressions and execute different code blocks for more than two conditions.This is useful when we want to selectively executes one code block(out of many) based on certain conditions.The if else ladder statement in C++ programming language is used to check set of conditions in sequence.If Condition yields false, execute else block.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |