input :
main(){
output :
a1 a2 a3 a4 a5
2. Multidimensional Arrays
C programming language allows programmer to create arrays of arrays known as multidimensional arrays. For example:
float [2][3]
The Input :
The Output :
Anything About C / C++
A looping statement is used to allow us to execute a statement or group statements multiply times.
This is the looping diagram !
Looping is divided on :
1. While Loop
Repeats a statement or group of statements while a given condition is true.
Example :
#include <stdio.h>
int main () {
int n = 1000;
while ( n > 0 ;) {
printf (" %d ",n);
n = n - 7;
}
printf (" \n ");
}
In making the decisions, we have to specify the conditions to be evalueted by the program. The statement are executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.
In the C programming languange, the functions of data types is for declaring variables or functions of every different data types.
Let's Check it out !
Data Types
1. Int
Basic signed integer type. Capable of containing at least the [−32767 s/d +32767] range. It is at least 16 bits in size.
The format of Int is %d
2. Char
Actually this data type can be either signed or unsigned depending on the implementation.
The format of Char is %c
3. Float
This data type usually reffered to as a single float type and used for decimal number of mathematic problems.
The format of Float is %f
4. Double
The float type, usually referred to as a double-precision floating-point type. Actual properties unspecified (except minimum limits). the different float with double is the range data.
The format of Double is %lf
Scanf ()
For reading the input from the users we use scanf. because scanf reads formatted byte input from stdin.
Printf ()
For Writing an output we use Printf, because Printf prints formatted byte output to stdout, a file stream or a buffer.
The format can be a simple constant string, but you can specify %d, %c, %f, %lf, etc. to print or read integer, character or float respectively. There are many other formatting options available which can be used based on requirements.
In this case we want to print 'Hello World' by using the C compiler.
Let's check it out !
Step 1
Open the Dev-C++ for making the source code. and then click open and click source file.
Like this !