Saturday, December 31, 2011
Today I am back with a New C Program, Which will print an Triangle as below
*
**
***
****
*****
Code:
#include
#include
void main()
{
int i, j;
clrscr();
for(i=0;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
Now Let's Illustrate above code.
- First 2 Lines are Pre-Processor Directives as you are already familiar with them.
- We started our Main section of Program. with void main(). Void is being used because we are not going to return any values.
- We have defined two Variables of Integer Type named i and j.
- clrscr() -- Clear Screen Function is for Clearing the DOS screen which will appear while we Run program.
- Now We take First for Loop here. Which we will use to print New Rows. Detail : for(i=0;i<=5;i++). [ i=0; Variable i is initialized with Value 0. i<=5; i will continue up to value 5. Because we have to print Asterisks (*) in Five Rows. i++; This Operator is used to Increment value of i by 1 every time.]
- Once another for loop is used with Variable j. We have used this to print Columns. Details : for(j=1; j<=i;j++). [ j=0; Variable j is initialized with Value 0. j<=i; j will continue up to value of i. (i.e. According to Rows) Because we have to print Asterisks (*) according to Number of Rows. j++; This Operator is used to Increment value of j by 1 every time.]
- printf("*"); -- This command will print * in the Screen according to loop mentioned in above (No. 6).
- Printf("\n"); -- This command will print new blank line when needed. i.e. According to first for loop.
- getch(); -- This is a function which is an Input Function. We use this for input of Passwords or such data which does not display in screen. We have just used this here to Hold Screen. So that we can see the output.
If you have some questions about above tutorial or other questions, You can comment below or directly mail me at
[email protected]. I will surely help you. Its my promise. Lets Enjoy Learning together....
Ehhhh... Happy New Year 2012....
John Bhatt
P.Yar.B Complex
Friday, December 30, 2011
Once again with Image of Last Year, reusing..... Very very happy New Year 2012.....
Friday, December 30, 2011
I was writing details from My Mobile. In some advance language Mobile Calender and Contact Sync process was running. I analyzed my last one Year, i.e. 2011. I have gained/earned something or Lost something.
This makes me to remember controversy with Gupta's early this year.
Corporate/Professional:
On the First week of February, I left Job at Best Roadways Ltd, then searched for Jobs in Delhi and struggled.
I worked with e-Fleet Systems Pvt Ltd for some days on march.
On the last week of May I went to my birthplace, Nepal for a week and returned on starting of June.
I worked with Indian Computer Institute till mid July.
Then I came to Chandigarh and started with Scorpion Express Pvt Ltd.
Personal/Educational:
I have Exams of DOEACC on mid January.
On April and May I had my Exams on Graduation, So I was at home. During this period Results of DOEACC Declared and I have passed both Exams that I have taken part earlier.
Got chance to practice with MS-Office from base level at Indian Computer Institute.
Have to leave study at DICS, Punjabi Bagh for some reasons [Reasons can be fetched from Above.]
I joined SLR Infotech, Chandigarh for .Net on the last week of November. Which will be continue till next Quarter of 2012.
I have lost so many things on last year but I remember one thing. One of Friend who is Senior and Founder of a company has told me that- "John, You are so Lucky, You got the Chance to see the truth in the earlier age of your life. These peoples are so cheap and we can't be."
Hope you had fantastic and very nice year. Your trip must be very successful and pleasant. If not don't be afraid or neither loose Hope, You will rock ahead......
John Bhatt
(P.Yar.B Complex)
Thursday, December 22, 2011
I am currently busy with my classes.
On my rest time I am currently busy with Two Websites. One of these two is of School and another is personal Blog. Links of these both Websites will be public on next post. And I will let you to have look at my these Works.
Needs your suggestion and feedback for Improvement.
--John Bhatt
At
Chandigarh, India
Wednesday, November 23, 2011
Hello,
Just Recently, I have configured My Blog to my own sub domain.
http://blog.johnbhatt.com
So it will be down for some time. And you can access this blog as soon as DNS records are changed.
Thanks for visit,
Hope you are enjoying.
Sunday, November 13, 2011
Currently I have renewed my domain and now working with designs, Because I am thinking of setting website again. We are temporarily using Blogger service for Website name, But Now My team and I am also working on Good Design and as soon as NS records are changed, You can access http://www.johnbhatt.com in new look and with many more contents.
Kindly visit again.
John Bhatt
P.Yar.B Complex
Thursday, November 03, 2011
Command
Definition
Commands are small piece of software, alternatively you can define command as individual program of function which are written in MS-DOS library.
According to the nature of command these are categorized in two groups. These are Internal Commands and External Commands. You will learn more about these commands in next chapter.
- Every Command will be executed only on hitting Enter key.
Types of Command
Internal Commands
Internal Commands: Commands that come built in with MS-DOS are called Internal Commands. These are fixed commands and the functions of these command is already defined in COMMAND.COM file which is the library file of MS-DOS. Some Internal Commands are as follows:
COPY
DEL
DIR
MD
CD
RD
REN
DATE
TIME
MKDIR
RMDIR
RENAME
DELETE
etc.
External Commands
External Commands: Commands those do not come with MS-DOS and needs to be installed separately or are located in Floppies or Hard Disc, are called External Commands. Some of these commands are as follows:
DELTREE
LABEL
TREE
FORMAT
DISKCHK
DISKCOMP
DISKCOPY
XCOPY
PRINT
HELP
ATTRIB
EDIT
FC
etc.
Thursday, October 27, 2011
Friends,
I have a good news, We have added Live streaming FM Radios of Far-Western Nepal in our Media Center. And we are adding more Radio Stations and TV Channels which are popular and are of requirement.
Keep visiting and provide feedback about our services..
John
P.Yar.B Complex
Thursday, October 27, 2011
Hi,
Today I am back here to share all the keywords of C language with you.
Keywords are predefined or reserved words which are used for a particular task like to declare a variable, or to return values, looping, etc. We use these keywords in various way.
- AUTO
- BREAK
- CASE
- CHAR
- CONST
- CONTINUE
- DEFAULT
- DO
- DOUBLE
- ELSE
- ENUM
- EXTERN
- FLOAT
- FOR
- GOTO
- IF
- INT
- LONG
- REGISTER
- RETURN
- SHORT
- SIGNED
- SIZEOF
- STATIC
- STRUCT
- SWITCH
- TYPEDEF
- UNION
- UNSIGNED
- VOID
- VILATILE
- WHILE
These keywords are used to define variable and call function and to do all basic tasks that can be done using ‘C’.
Keep providing feedback…
Thursday, October 27, 2011
As in earlier posts I have introduced you with C Language. C language is the worlds most used and very powerful language for making Windows Application also Unix and Linux applications.
We have basically five data types in C Language. These are as following:
Character: char
Integer: int
Float: float
Double: double
Void: void
Here is a simple program that will print sum of two variables.
As you learnt in previous post, you will include header file(s) then open body of program.
#include
#include
void main()
{
int a=5,b=7,c;
c=a+b;
printf("Sum of Two Number is %d.",c);
getch();
}
We will discuss about data types in next post. Keep checking.
Thursday, October 13, 2011
Dear Friends,
We are shifting our data to new server. Due to some problems with our old server, we have to replace our all data and some data might have been lost. Media Center is being developed rapidly with top priority.
Now after you will be able to Watch your Live Televisions Channels, Listen your favorite FM radios, Listen and Download Nepali and Far-Western mp3s without any registration and free of cost.
Click here to visit our New
Download Center at http://media.johnbhatt.com.
Hope you will have a pleasant visit with us.
--John Bhatt
P.Yar.B Complex
Saturday, October 08, 2011
Dear Viewers,
Greeting from P.Yar.B Complex,
You are viewing this page, because we are updating our portal and you will soon be able to access our new and updated site with latest contents.
Please keep visiting. We will be back to you soon...............
Thanks for your patience and regrets for problems cost to you...
John Bhatt,
P.Yar.B Complex
Friday, September 02, 2011
Hey Friends,
I have a good news for you even it is late.
Famous FM Radio Stations of Far-Western part of Nepal are live over internet. Now you can enjoy your very own favorite FM Radios like Dinesh FM, Suklaphanta FM, Radio Mahakali atc live on internet.
As you are known Dinesh Fm 93.8 has their own website and are broadcasting Online since last year. Visit http://www.dineshfm.com and listen online radio their.
Recently Two radio stations of Kanchanpur, Suklaphanta FM 99.4 MHz and Mahakali FM 96.2 MHz are also online via their websites.
http://www.sfm994.com
http://www.radiomahakali.org
Even these both websites are still not designed completely but online broadcasting has been started since last months. You can enjoy these websites even you live at Golf countries, India, USA or any part of globe.
If you face any type of problem listening these radios, you can contact me. These radios are also available at my website http://www.johnbhatt.com.
Thanking You,
John Bhatt
Friday, September 02, 2011
Laloo Prasad sent his Bio Data - to apply for a post in Microsoft Corporation, USA.
A few days later he got this reply:
Dear Mr. Laloo Prasad,
You do not meet our requirements. Please do not send any further correspondence. No phone call shall be entertained.
Thanks
Laloo Prasad jumped with joy on receiving this reply.
He arranged a press conference :
"Bhaiyon aur Behno, aap ko jaan kar khushi hogee ki hum ko Amereeca mein naukri mil gayee hai."
Everyone was delighted.
Laloo prasad continued...... "Ab hum aap sab ko apnaa appointment Letter padkar sunaongaa ? par letter angreeze main hai - isliyen saath-saath Hindi main translate bhee karoonga.
Dear Mr. Laloo Prasad ----- Pyare Laloo prasad bhaiyya
You do not meet ----- aap to miltay hee naheen ho
our requirement ----- humko to zaroorat hai
Please do not send any furthur correspondance ----- ab Letter vetter bhejne ka kaouno zaroorat nahee.
No phone call ----- phoonwa ka bhee zaroorat nahee hai
shall be entertained ----- bahut khaatir kee jayegi.
Thanks ----- aapkaa bahut bahut dhanyavad.
Bill Gates. ---- Tohar Bilva.
Saturday, August 27, 2011
Dear All,
This is to tell you that how to insert background color and image in a webpage.
For Filling Color as Background
We use bgcolor attribute with body tag. Here is an example showing that how to fill color.
Webpage with Background Color
This page will have Red color as its background.
Click here for preview. Page With Background Color
For Inserting Image as Background
We use background attribute with body tag. Here is an example showing that how to insert image as background.This page will have my photos as its background.
Wednesday, August 24, 2011
Thursday, August 18, 2011
Hello! Welcome Back,
Now open the notepad by Typing notepad in Run
Run command.
Now type the following codes in notepad and save it with extension .htm or .html.
First HTML Page
Anything you want to display in the website, you are allowed to write here.
....
....
........
Now I am going to describe the above codes.
First we started with tag which starts the HTML language. This is to identify that the script is written in HTML for Web-Browsers. Then we started tag which is used to write scripts and for advance level use. Then we started tag. This is the title of page which is written in Title Bar of Browser. Then we closed tag using forward slash . Then we also closed tag using forward slash . Now our header area is closed and we have to start body of web page with tag. We can write anything we want to display in the webpage inside body area. After writing the body contents we have to close tag with . And we closed all HTML tags by the help of tag.
In brief these are the most important tags to create a webpage.
Visit next post for next chapter.
Hey All,
Hope you all must be fine. I was out of range for my Exams of BA 1st Year. I went to Varanasi for my exams and stayed at A.P. Singh's as usual. All thing is right, But I have problem with my Job.
I left Best Roadways Ltd. due to arguments with Mr. Gupta (Director) and then I joined e-Fleet Systems Pvt Ltd but Mr Gupta played trick and I have to leave that job also. Nowadays I am searching a good job but can't find one. I have to manage for my Classes and expenses for living procedure. Even this is not a minor problem but I am facing this with Fun and trying to get a good job. I would like to thank my friends, teachers, family members and specially A.P. Singh for their support. Names of some people helped me in this problem are Jitendra Singh, Abhinav Singh and other friends which I can't list over here.
Hope all will be OK and see you back.
With Regards and Best Wishes,
John Bhatt
P.Yar.B Complex