Skip to main content

C Programming Introduction

 

hi friends! Before we depth into c program let us understand, what is programming

Programming is the process of creating a set of instructions that tell a computer how to perform a task.Programming can be done using a variety of computer programming languages, such as JavaScript, Python, and C++, PHP, react native, etc.

ex:- websites are developed using php
mobile application can be developed using reactnative etc

Depending on application type, we choose different programming languages to develop it.

Let us see an example of c programming to print "hello world" on screen
program

#include <stdio.h>
int main()
{
/* Our first simple C basic program */
printf("Hello World! ");
return 0;
}

output
Hello World!

run the code on online compiler https://www.onlinegdb.com/online_c_compiler or install c compiler on system and run c programs.

C Basic commands Explanation
#include <stdio.h> 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.

/*_some_comments_*/ 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.

return 0;
This command terminates C program (main function) and returns 0.

}
This indicates the end of the main function.



















      

 


Comments

Popular posts from this blog

Software Development Life Cycle

  Hi Friends!! Interested in developing software projects? Need a website for your business? Want to develop an app of your idea? Yes!. So before developing, let us understand what are the different stages to develop software. Below 7 stages will help in developing a quality software product. Requirements Gathering  Analysis Design Coding Testing Implementation Maintenance Requirements gathering If you want to make your product. Understand what product you want to develop. Plan the product. Gather the content required for making the product. Ex: Want to develop a website for school. Plan the website, like website should contain pages for home, about, courses, gallery, contact. Get the content of mission, vision, gallery, etc of school. If you are working for a client(who needs software) product, then understand the client requirement. Ask questions to understand the product like what functionalities should the product contain?collect all his requirements and have a basic plan ...

C programming with practical Questions

Basics C language is one of the powerful languages. Below are some of the features of C language. Ø   Reliability Ø   Portability Ø   Flexibility Ø   Interactivity Ø   Modularity Ø   Efficiency and Effectiveness   1) C program to calculate Simple Interest. Given principal (amount), time and interest rate by user, calculate simple interest based on given rate of given time period. 2) Ask the employee details   Name   initial---(surname only single letter, take datatype as char)   Age   Salary-(take datatype double)   expected expenditure   actual expenditure   and   display name and remaining balance of salary.    Operators The symbols which are used to perform logical and mathematical operations in a C program are called C operators. These C operators join individual constants and variables to form expressions. Operators...

Frontend Vs Backend Coding

Frontend Vs Backend Coding Let us understand how this development is done.Development is divided into two parts frontend development and backend development. The front end, also called “ client-side ” programming, is what happens in the browser. It’s everything the user sees and interacts with. The back end, also called “ server-side ” programming, happens on the server and the database. It’s the machinery that works behind the scenes. developing a website Front-end Development Part of a website that the user interacts. Everything that users experience directly: text colors and styles, images, graphs and tables, buttons, colors, and navigation menu. HTML, CSS, and Javascript are the languages used for Front End development. HTML ( HyperText Markup Language) adds content on the web page with the help of HTML elements CSS  (Cascading Style Sheets)  adds styles to HTML elements Javascript adds behavior in the webpage   Ex: calculate, manipulate, and validate d...