Hello friends in this blog i will tell you how can you print your name in c language . You will learn code with the example in this platform .lets start.
c language में name कैसे प्रिंट करे || Hbs computer coursre
So , You can understand to see this photo
So how can you write this type of code first of all what will you have to do , I suggest you ,you should write algorithm so that program will be easy. Algorithm is as follows ,if you don't know what is algorithm,to know follow this link
EXAMPLE -Write an algorithm to print your own name
1 Start
2 Output ..name...
3 End
code:
# include<stdio.h>
#include<conio.h>
void main()
{
printf("Ram");
getch();
}
Explanation: 1 first of all we include header file
2 then we write void main function
3 then we use curly brackets
4 then we write our statement in the curly brackets
5 then we write getch function to hold the screen
if you want to know what is header file ,main function ,getch function follow this link :
How can you print C on screen ?
so ,this is same code like above code .We use star and \n on place of name.The code will be written like this .
#include<stdio.h>
#include<conio.h>
void main()
{
printf("*****\n*\n*\n*\n*****);
getch();
}
Output of this code:
.png)
.png)
.png)
.png)
Comments
Post a Comment