diff --git a/c/Pattern.c b/c/Pattern.c index 64d5ff15..db69ad95 100644 --- a/c/Pattern.c +++ b/c/Pattern.c @@ -1,9 +1,12 @@ #include #include -int main() + +//Execution of every program start with main function. +int main(void) { - int i,w,p; + int i,w,p; //variable declaration char str[]="SURYA"; + printf("\n"); for(i=0;i<5;i++) { @@ -16,8 +19,8 @@ int main() p=i+1; printf("\n%-5.*s",p,str); } - getch(); - return 0; + getch(); //getch take any value form the keyboard. + return 0; // it will return 0 to the main function because return-type of main function is int. } /* The output of the code will be as follows---