LEARN BASICS OF C/C++ & EXPLORE CODING OPPORTUNITIES
Basics of C: C is a general-purpose and imperative computer programming language that was designed by Dennis Ritchie at Bell Labs in 1972. Here are some basics of c language.
#include int main() { /*_some_comments_*/ printf (“Hello_World! “); getch(); return 0; }
Syntax of Program: include: This is a preprocessor command that includes standard input output header file(stdio.h) from the C library before compiling a C program int main(): This is the main function from where execution of any C program begins. { This indicates the beginning of the main function. /*comment*/: whatever is given inside the command “/* */” in any C program, won’t be considered for compilation and execution. printf (“Hello_World! “); printf command prints the output onto the screen. getch(); This command waits for any character input from keyboard. return 0; This command terminates C program (main function) and returns 0. } This indicates the end of the main function.
Basics of C++ C++ is a general-purpose object-oriented programming (OOP) language, developed by Bjarne Stroustrup, and is an extension of the C language. Here are some basics of C++ language.
#include using namespace std; int main() { cout << "Hello this is C++"; }
Syntax of Program: Header files are included at the beginning just like in C program. Here iostream is a header file which provides us with input & output streams. Header files contained predeclared function libraries, which can be used by users for their ease. Using namespace std, tells the compiler to use the standard namespace. Namespace collects identifiers used for class, object and variables. The namespace can be used by two ways in a program, either by the use of using statement at the beginning, like we did in the above-mentioned program or by using the name of the namespace as a prefix before the identifier with scope resolution (::) operator. Example : std::cout << "A"; main(), is the function which holds the executing part of the program its return type is int.
Cont... â&#x20AC;˘ cout <<, is used to print anything on the screen, same as printf in C language. â&#x20AC;˘ cin and cout are same as scanf and printf, the only difference is that you do not need to mention format specifiers like %d for int etc, in cout & cin.
ABOUT US
Smartinfosys.net is a leading website development and corporate branding company that has been on the scene since 2001. Our tagline "Empowering People and Business" well expresses our mission of providing highly functional & affordable websites, PHP based web applications & Android applications to empower personal and business processes.No matter what stage of development your business, we've been there!
contact 401, Meridian Tower, Nr. Apple Hospital,Udhna Darwaja,Surat.Gujarat (INDIA) - 395002
+91 261 2347223 +91 94261 57243
info@yourseopick.com