Programming in C 312303 Manual Practical No.1 Answer

Programming in C 312303 Manual Practical No.1 Answer

Programming in C 312303 Manual Practical No.1 Answer
Programming in C 312303 Manual Practical No.1 Answer
Hey MSBTE students welcome to our site in this special blog post we perform practical no.1 of Programming in C. in which we Install and study the C programming environment and answer the practical related questions.

This practical is useful for students to understand the procedure of Installation of C programming Environment.

Exercise

1. Install the C compiler on the PC and write the steps.
Answer:
  • Get the Turbo C program: Look for a safe place to get the Turbo C program, like a website you know is good. Don’t get it from places you don’t recognize.
  • To start installing the program, click twice on the downloaded file which usually ends in .exe.
  • Follow the Installation Wizard, which will help you set up the program. Just pick a place to put it on your computer and do what it tells you to do on the screen.
  • After the installation is finished, you will have Turbo C installed on your computer.
2. Draw the notations of flowchart.
Symbol Purpose Description
Flowline symbol in flowchart of programming Flow line Shows the flow of logic by connecting symbols.
Terminal symbol in flowchart of programming Terminal(Stop/Start) Describes the start and the end of a flowchart.
Input/Output symbol in flowchart of programming Input/Output Utilized for input and output operation.
Processing symbol in flowchart of programming Processing Utilized for arithmetic operations and data-manipulations.
Decision making symbol in flowchart of programming Decision Utilized for decision-making between two or more alternatives.
On-page connector symbol in flowchart of programming On-page Connector Utilized to join different flowline
Off-page connector symbol in flowchart of programming Off-page Connector Utilized to join the flowchart portion on a different page.
Predefined process symbol in flowchart of programming Predefined Process/Function Describes a group of statements performing one processing task.
3. Write an algorithm and draw a flowchart for the C program to read two numbers and print those two numbers.
Answer:
Algorithm:
  • Start: Begin the program execution.
  • Declare Variables: Declare two integer variables to store the numbers that will be read from the user.
  • Read Input: Use the scanf function to read two integer values from the user and store them in the previously declared variables.
  • Print Numbers: Use the printf function to print the values stored in the two variables.
  • End: Terminate the program execution.
Flowchart :

312303 Manual

4. Write a program in C for Q.3.

Answer:

#include <stdio.h>

int main() {
  int num1, num2;

  // Read two numbers
  printf(“Enter two numbers: “);
  scanf(“%d %d”, &num1, &num2);

  // Print the numbers
  printf(“The numbers you entered are: %d and %dn”, num1, num2);

  return 0;
}

Practical Related Questions

1. What is compiler and debugger.
Answer:
  1. A compiler is like a translator for computers. It takes the instructions that a programmer writes in a special language and changes them into a language that the computer can understand. The programmer writes the instructions in a special program, and the compiler reads it and changes it into a different format that the computer can use.
  2. A debugger is like a detective tool that helps find and fix mistakes in a computer program while it’s running. It’s like searching for and getting rid of little bugs that cause problems in the program. Debugging is the way programmers fix these bugs to make sure the program works correctly.
2. State any 6 features of C programming language.
3. Define algorithm.
Answer:
An algorithm is like a recipe that tells you step-by-step how to solve a problem or finish a task. A function is like a special ingredient that you can use in different parts of your project to make things easier. It’s like having a set of instructions that help you figure out a problem or do something specific.
4. Define Flowchart.

Answer:
Flow charts are like maps that show the order of steps to follow. They use shapes and arrows to show how things are connected and what happens next. Flow charts help people understand how things work and make decisions. They are used in many different areas to help with planning and organizing tasks.
5. Write an algorithm and draw the flowchart for printing “Hello World “.

Answer:
Algorithm for Printing “Hello World” in C
  • Start: Begin the program execution.
  • Print Message: Use the printf function to print the string “Hello World” followed by a newline character (n).
  • End: Terminate the program execution.
Flowchart:
         +—————–+
          |       Start     |
          +—————–+
                   |
                   v
          +—————–+
          | Print “Hello Worldn” | (printf)
          +—————–+
                   |
                   v
          +—————–+
          |        End        |
          +—————–+

Conclusion

We successfully completed programming in C 312303 Manual practical no.1 with title Install and study the C programming environment. and answer the practical related questions.

Leave a Reply

Your email address will not be published. Required fields are marked *