3/30/21
3/22/21
C Program to Find ASCII Value of Character.
Suresh Mishra Monday, March 22, 2021 Basic Programs, Beginners, C, C-Programs, Programming 2 comments
C program to find out the ASCII code of any Character.
Method 1
#include<stdio.h>
void main()
{
int a;
char ch;
printf("Enter any character:");
scanf("%c",&ch);
a=ch;
printf("ASCII value of %c is %d",ch,a);
getch();
}
Method 2
#include <stdio.h>
void main()
{
char c;
printf("Enter any character =");
scanf("%c", &c);
printf("ASCII Value is = %d",c);
return 0;
}
Output:-
3/17/21
C Program to find the average marks of 5 subjects -- C Programming
Suresh Mishra Wednesday, March 17, 2021 Basic Programs, Beginners, C, C-Programs, Programming 1 comment
#include<stdio.h>
int main()
{
int a, b, c, d, e, sum;
float ave;
printf("Enter Marks of Subjects 1 =");
scanf("%d",&a);
printf("Enter Marks of Subjects 2 =");
scanf("%d",&b);
printf("Enter Marks of Subjects 3 =");
scanf("%d",&c);
printf("Enter Marks of Subjects 4 =");
scanf("%d",&d);
printf("Enter Marks of Subjects 5 =");
scanf("%d",&e);
sum = a+b+c+d+e;
ave = sum/5;
printf("\nSum of the Marks are :- %d ", sum);
printf("Average of the Marks are :- %f", ave);
getch();
}
Output :-
3/10/21
IF-Else Condition in C Programming Part - 1
If Else Condition in C Programming
Hey Friends, in day-to-day life people take a lot of decisions by themselves. For ex:-
1. If it rains today, then I will not go to college
If not then I will go
2. If the train is late, I will catch the train
If not, I will not be able to get the train
Taking decisions in programming is an important part of it. C language also uses decision instruction. In C Programming there are mainly 3 types of decision control instruction
1. If
2. If-else
3. Switch
Till now we have studied sequence control instruction. In that instruction, Statements are executed in the order in which they have written or appear. But During the high-level projects, we need to execute a set of instructions by conditions. If the first condition is true then code will run or if the condition is not true (false) then the other condition runs or execute.
So the selection of the condition (true or false) of instructions is called Decision.
Now, In this article, we gonna learn about decision control instruction.
If Statement in C programming
In C programming, (if) is a keyword to execute an instruction if the instruction is true. In Simple World, if the given condition is true your code will be run. If not then the code didn’t run.
The Syntax of the if the condition was given below:-
If (condition)
{
Statement 1;
Statement 2;
Statement 3;
}
Let us Check through an example :-
#include <stdio.h>
int main()
{
int a;
printf("Enter the Number = ");
scanf("%d", &a);
if (a<=10)
{
printf("A is Smaller than 10");
}
return 0;
}
Output:-
Look at the function of the code:-
• In this program, we take a numeric input from the user to check whether a number is greater than 10 or smaller than 10.
• If the numerical number is smaller than 10. Then the output will display a message to the user that your input is smaller than 10.
• But if the number is greater than 10. Nothing will be shown on the display. Because we give only one statement in this program.
So that’s all for today guys.. we will continue the rest of the function in the next part of the article. if you have any query related to this comment below.
C Program to Add Two Integer Number -- C Programs
Suresh Mishra Wednesday, March 10, 2021 Basic Programs, Beginners, C, C-Programs, Programming 1 comment
In our previous tutorial, we had made a simple program of C language in which we had printed Hello World on the display. Hope you guyz understood that program. Now, today I am going to make another C program which takes the 2 input from the user in the numerical value and gives us the sum of these two numerical value. So Let’s Begin…
C Program to Add Two Numerical Value.
#include<stdio.h>
int main()
{
int A,B,C;
printf("Enter the value of A=");
scanf("%d",&a);
printf("Enter the value of B=");
scanf("%d",&b);
c=a+b;
printf("Answer is=%d",c);
getch();
}
Output :-
Look at the function used in the above code
1. In the first line of code we include a header file named <stdio.h> which is used to add the printf, scanf function in the program.
2. On the second line of the code we use int main () function. It shows that your program starts executing from here.
3. After that we declare 3 variable (A, B, C) respectively. The first variable A store the first numerical value and the second variable B store the second numerical value and the sum of these two number are stored on the third variable C.
4. After the declaration of the variable we give the message to the user to enter the first number. We use printf() function to give the message which is printed on the monitor screen.
5. After the message the value provided by the user was stored in the first variable name A. we assign the value into A variable by using scanf() function.
6. In scanf() function we use %d on it. %d indicates the compiler that the user gives an integer value to it.
7. You also notice that we use & (and) symbol on both scanf function what are their mean. The & symbol tell the compiler that the input given by the user is stored on the specific location. (The first value stored on A variable and the second value stored on B variable respectively).
8. At the last line of code we use a function name getch(). This function is used to hold the output screen until the user presses any button or click on the output screen.
3/9/21
C Program to Print Hello World - C Programs
Suresh Mishra Tuesday, March 09, 2021 Basic Programs, Beginners, C, C-Programs, Programming No comments
Hello, Friends, Today's tutorials are based on the C programming language. Today we are going to make A simple C program to display “Hello World” on the Screen. It is very simple so that the beginners can understand easily. As we know that if someone (user) wants to learn anything in life. First of all, he has to learn its basic thing. So basically Hello World is a basic of c program in C programming languages. Let’s Begin
Program to display ”Hello World”
#include <stdio.h>
Int main()
{
printf("Hello World!!");
return 0;
}
Now, look at the function of all the above codes.
1. The First line in the program #include <stdio.h> is preprocessor command, which tells the compiler to include the content of <stdio.h> file in the program. The full form of stdio.h is Standard Input and Output. Stdio.h is a header file (Extension of the header file is .h) which contains functions such as Printf() or Scanf() to take input from the user and display the Output respectively.
2. The Next line Int main() is the main function where the program execution starts.
3. The Next line is printf(“…”). It is a function that comes under the <stdio.h> header file to display the several lines which the user wants to see as Output. (Write your messages under the double comma otherwise it can’t display )
4. And the last line of the program returns 0. This line in the program describes that the program returns 0 value at the end.
3/8/21
What is Multimedia ? Different type of multimedia Components.
Suresh Mishra Monday, March 08, 2021 basic informataion, Beginners, Comptuer Knowledge, MultiMedia No comments
Hey Friend, Hope you all fine. In Today Era, we use many technologies in our daily life. Today we do many things with messaging apps like Whatsapp, Facebook Messenger, Signal, etc. Just Example:- Chatting, Audio-Video Sharing, Video Calling, Audio Calling, Image Sharing, Stories Sharing, etc Sending these files from one place to another place via the internet. Do you know that we send millions of files from one place to another with the help of the internet.
But Do you know all these files (Audio, Video, GIFs, Images) are generally known as Multim
edia files.
So Friends today we are going to discuss multimedia through this article. So Let’s Begin….
What is Multimedia?
Multimedia is a digital form of communication through different types of media such as text, video, audio, images, etc. It is a medium of communication between two users.
Multimedia is a representation of an attractive and interactive manner with the use of the combination of text, audio, videos, animations, etc. In Simple words, Multimedia is a computerized method of representing information through audio, video, images, etc. The Name multimedia is formed by two words is Multi means many and Media means information (image, video, audio). Many types of media are known as multimedia.
Components of Multimedia
These are the Basic Component of the Multimedia
Audio: - Audio is the file that has some noise, sound in it within the range of the human ear can hear it or capable to hear. In other words, Any digital information that stored sound, noise in a file that is capable of hearing by a normal human.
Video:- Video is an electronic medium for the recording, copying, and broadcasting of moving visual images.
Animation: - Animation is the art of presenting images with the help of computer technology in the manner that the user thinks that it is running like a film.
Text: - In all the multimedia production contains some amount of text. The text has generally different fonts, shapes, sizes,s, etc. Text is the character that the user can read.
Images: - An Image is a visual representation of something that can be stored in electronic form. There are Many images such as- jpg, jpeg, png, etc
In this tutorial, we have seen multimedia and its components. If you have any issues related to this article. then you can tell us by commenting below.
Popular Posts in this week
Follow on Twitter
Categories
- Computer (52)
- Facebook (12)
- HTML (17)
- Internet Tips (33)
- MS Excel (17)
- Tips and Tricks (32)
Blog Archive
-
▼
2021
(37)
-
▼
March
(7)
- C Program to Convert Fahrenheit to Celsius.
- C Program to Find ASCII Value of Character.
- C Program to find the average marks of 5 subjects ...
- IF-Else Condition in C Programming Part - 1
- C Program to Add Two Integer Number -- C Programs
- C Program to Print Hello World - C Programs
- What is Multimedia ? Different type of multimedia ...
-
▼
March
(7)