Introduction to C Programming

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which language is the only one a computer can directly understand?

  • Binary Language
  • High-Level Language
  • Assembly Language
  • Machine Level Language (correct)

Assembly language uses mnemonic codes, which are easily understood by computers without translation.

False (B)

What is the role of an assembler in the context of assembly language?

The assembler translates mnemonic codes into machine code.

Which of the following is a characteristic of High-Level Languages (HLL)?

<p>Instructions resemble ordinary English statements. (A)</p> Signup and view all the answers

Translators are required to convert HLL into ______ language.

<p>machine</p> Signup and view all the answers

Match the following programming languages with their respective categories:

<p>BASIC = Character Based Language JAVA = Graphic Based Language</p> Signup and view all the answers

Which of the following statement accurately describes the purpose of an algorithm?

<p>It is a step-by-step method to solve a problem. (A)</p> Signup and view all the answers

A flowchart is a textual representation of an algorithm.

<p>False (B)</p> Signup and view all the answers

What is the purpose of using standard symbols when drawing a flowchart?

<p>To ensure universal understanding and acceptance of the flowchart.</p> Signup and view all the answers

In a flowchart, which symbol is used to represent a decision?

<p>Diamond (B)</p> Signup and view all the answers

In flowcharting, the ______ symbol is utilized to represent input and output operations.

<p>parallelogram</p> Signup and view all the answers

Match the flowchart symbol with its corresponding activity:

<p>Oval = Indicates the beginning or end of the flowchart Rectangle = Represents processing and assigning values.</p> Signup and view all the answers

Which symbol is used for decision making in a flowchart?

<p>Diamond (A)</p> Signup and view all the answers

A diamond symbol in a flowchart always has 2 input lines and 1 output line.

<p>False (B)</p> Signup and view all the answers

In a flowchart, what does a parallelogram typically represent?

<p>Input and output operations.</p> Signup and view all the answers

PowerPoint is part of which software package?

<p>Microsoft Office (D)</p> Signup and view all the answers

In PowerPoint, individual pages are referred to as documents.

<p>False (B)</p> Signup and view all the answers

What is the term used for individual pages in a PowerPoint presentation?

<p>Slides</p> Signup and view all the answers

Which of the following is NOT listed as an advantage of using PowerPoint?

<p>Directly editing images from the web (D)</p> Signup and view all the answers

The PowerPoint Presentation is often used as a ______ in educational institutions.

<p>teaching aid</p> Signup and view all the answers

Match the method used to open PowerPoint using the start button:

<p>Click on the Start Button = Click on All apps and then on PowerPoint</p> Signup and view all the answers

Which of the following is the default name of a new presentation in MS PowerPoint?

<p>Presentation1 (A)</p> Signup and view all the answers

The Quick Access Toolbar is located below the Ribbon in PowerPoint.

<p>False (B)</p> Signup and view all the answers

What commands are shown by default on the Quick Access Toolbar?

<p>Save, Undo, Redo, Start From Beginning</p> Signup and view all the answers

What is the main function of the Ribbon in PowerPoint?

<p>To help you quickly find the commands you need to complete a task (B)</p> Signup and view all the answers

Each ______ in the Ribbon contains several groups of related commands.

<p>tab</p> Signup and view all the answers

Match the PowerPoint Tab with its function:

<p>Home Tab = Used to cut/copy/paste, font, paragraph, slide. Insert Tab = Used to add something to a slide. Like Pictures, shapes, chart.</p> Signup and view all the answers

Which option displays your slide in full-screen mode and completely hides the Ribbon from view?

<p>Auto-hide Ribbon (B)</p> Signup and view all the answers

The Tell Me feature is available in all versions of PowerPoint.

<p>False (B)</p> Signup and view all the answers

What information does the status bar display in PowerPoint?

<p>Total number of slides, current slide number, view buttons, and zoom slider.</p> Signup and view all the answers

Which view in PowerPoint is the default view, where you create and edit slides?

<p>Normal view (A)</p> Signup and view all the answers

The view that fills the PowerPoint window with a preview of your presentation is called ______ view.

<p>reading</p> Signup and view all the answers

Match the definition with the description:

<p>Slide Area = The area where you can add and edit the slide object. Task Pane = The pane can contain more options and appears at the right side of the power point window.</p> Signup and view all the answers

What happens when you click on the 'File' menu in PowerPoint?

<p>The Backstage view opens (C)</p> Signup and view all the answers

The Mini toolbar appears only when you right-click anywhere on a slide.

<p>False (B)</p> Signup and view all the answers

What function key can be pressed to start a PowerPoint presentation from the beginning?

<p>F5</p> Signup and view all the answers

To insert special text effects into a slide you can use:

<p>WordArt (B)</p> Signup and view all the answers

Clip Art is the collection of media files that Microsoft includes within the ______ application.

<p>powerpoint</p> Signup and view all the answers

The Insert Picture Dialog box will appear with:

<p>Online Pictures = A bing search bar.</p> Signup and view all the answers

What is the maximum number of rows and columns you can insert in a table using the grid method in PowerPoint?

<p>8 rows and 10 columns (D)</p> Signup and view all the answers

Flashcards

Machine Level Language

A language that a computer can understand, coded in 0s and 1s.

Assembly Level Language

A symbolic language that uses mnemonic codes to avoid difficulties faced in machine language.

Assembler

A translator that is essential for translating the mnemonic codes into machine codes.

High Level Language

These languages resemble ordinary English statements and are easy to understand.

Signup and view all the flashcards

Character Based Language (CUL)

Character based codes are used for writing programs.

Signup and view all the flashcards

Graphic Based Language (GUL)

Graphic codes are used in addition to character codes for designing the program.

Signup and view all the flashcards

Algorithm

It is only the written form of solving the problem step by step method.

Signup and view all the flashcards

Flowchart

A pictorial representation of an algorithm with symbols representing steps.

Signup and view all the flashcards

Oval symbol in flowchart

Indicates the beginning or end of a flowchart program.

Signup and view all the flashcards

Parallelogram symbol

Used for input/output operations.

Signup and view all the flashcards

Rectangle symbol in flowchart

Used for processing and assigning values.

Signup and view all the flashcards

Diamond symbol in flowchart

Used for condition checking

Signup and view all the flashcards

Flow lines in flowchart

Used to indicate the flow/direction of data.

Signup and view all the flashcards

Slide Show View

Display the content of the slide in full-screen mode.

Signup and view all the flashcards

Slide Notes

View used to add notes, these are called speaker notes.

Signup and view all the flashcards

Slide Navigation Pane

A thin strip on the left side of the PowerPoint window that contains thumbnails of all your slides.

Signup and view all the flashcards

Slide Area

One of the principal regions in PowerPoint Where you add and edit the slide objects.

Signup and view all the flashcards

Template

A new presentation will appear with the selected template.

Signup and view all the flashcards

Title Place Holder

Allow the user to hold the title of a slide.

Signup and view all the flashcards

Text Place Holder

Used to hold any text description that has to be displayed on a slide.

Signup and view all the flashcards

Object Place Holder

Used to hold graphs and other objects that have to be displayed on a slide

Signup and view all the flashcards

Apply Animation

You can apply animation effect to the objects on your slide

Signup and view all the flashcards

Apply animation

Allow you to view and manage all of the effects that are on the current slide.

Signup and view all the flashcards

Slide Show

Used to check final sizes, colors, animation effects, transition between slides, sounds, other controls and effects.

Signup and view all the flashcards

'C' language

A widely used CUI based high level programming language.

Signup and view all the flashcards

Main

Every 'C' Program required a main() function. The place of main () function is where the program execution begins.

Signup and view all the flashcards

Stdio.h

Standard Input Output header file, used for input and output function.

Signup and view all the flashcards

Scanf( )

The scanf() function allows the user to input data into the variable from the keyboard during the run time.

Signup and view all the flashcards

getchar() function

Single character can be entered into the computer using the Library function

Signup and view all the flashcards

Putchar() function

Single character can be displayed using the library function.

Signup and view all the flashcards

gets( ) function

The gets() function reads a string of character from the keyboard and store the input in a string variable.

Signup and view all the flashcards

puts( ) functions

The puts() function display the string on the output device.

Signup and view all the flashcards

If statement

Use to test a condition and take action according to the value.

Signup and view all the flashcards

Switch statement

Is a multi directional conditional control statement.

Signup and view all the flashcards

Loop

Continuously repetition called loops are Used in program for the purpose of executing a block of statements several times.

Signup and view all the flashcards

Study Notes

  • This document contains study notes about computer language and C programming

Computer Language:

  • A computer language or programming language is required to communicate with and interpret instructions for a computer
  • Programming languages can be broadly classified into Low Level and High Level Languages

Low Level Language:

  • Further divided into Machine level and Assembly level languages
  • Machine level language is the only language that a computer understands directly
  • Machine level instructions are coded in the form of 0 and 1, making it a binary language
  • Writing in machine language is difficult and prone to errors, and requires specific knowledge of machine codes
  • Assembly level language was developed to avoid the difficulties of machine language
  • Assembly level language uses symbolic codes called mnemonic codes.
  • An assembler translates mnemonic codes into machine codes

High Level Language (HLL):

  • The development of HLL brought a revolution in the field of computers, making programming easier
  • Instructions in HLL resemble ordinary English statements and are easy to understand
  • Programmers do not need to remember the memory addresses where data is stored
  • HLL requires translators to convert it into machine language
  • HLLs are of two types based on their language structures: Character Based Language (CUL) and Graphic Based Language (GUL)
  • Character Based Languages use character-based codes for writing programs like BASIC, FORTRAN, ALGOL
  • Graphic Based Languages use graphic codes in addition to character codes for designing programs like VISUAL BASIC, JAVA

Algorithm & Flow Chart

  • Solving any problem with a computer requires proper planning and organization
  • A clear understanding of input data, the expected output, and the steps to achieve the output are needed
  • An algorithm is a step-by-step method to solve any problem in written form
  • A flowchart is a pictorial representation of an algorithm, showing the sequence of operations with specific symbols

Common Flowchart Symbols and Their Activities:

  • Oval: Indicates the beginning or end of a flowchart program
  • Parallelogram: Represents input/output operations
  • Rectangle: Used for processing and assigning values
  • Diamond: Represents a decision point for condition checking (Yes/No)
  • Flow Lines: Connect the steps of the flowchart, indicating the flow of data
  • On-page Connector: Connects one step in the flowchart with another step on the same page
  • Off-page Connector: Connects one step in the flowchart with another step on a different page

Decision Making in Flowcharts:

  • Achieved using the Diamond symbol, which has one input and two output lines: one for True and another for False

Loop

  • In loop the continuation of the flow of control repeats a set of instructions until a condition is false

Microsoft PowerPoint:

  • Part of the MS Office suite
  • It is a presentation graphics program used to create presentation slides with graphical activities, text, animations, and sound effects

Elements of PowerPoint Package:

  • Presentation: A way to describe something to an audience, made on any topic, using slides
  • Slide: Similar to a page of a word document; a presentation is made up of slides

Advantages of Power Point:

  • Helps to easily create beautiful presentations
  • Allows one to add sound, video, and graphics
  • Allows one to add animation and sound effects to images and text
  • Presentations can be viewed as slide shows, printed on paper, and used as a teaching aid

Getting Started with MS Power Point:

  • Using the start button: Click the start button, click all apps, then click PowerPoint
  • Using the Search option: Type PowerPoint in the search box on the taskbar, and click PowerPoint from the search results

PowerPoint Window Components:

  • Title Bar: Topmost bar of the PowerPoint window; displays program name and active file name
  • Quick Access Toolbar: Located above the Ribbon, it provides quick access to common commands like Save, Undo, and Redo
  • Ribbon: Designed to help users easily find commands needed to complete a task; contains multiple tabs below the Title bar
  • Tabs: Each tab groups related commands, such as the Font group on the Home tab for text formatting
  • Dialog Box Launcher: A button in the lower right corner of some groups that opens a dialog box with additional related commands

Hiding and Showing the Ribbon:

  • The Ribbon can be hidden to maximize screen space by using the Ribbon Display Options
  • Options include Auto-hide Ribbon(full-screen mode), Show Tabs(hides command groups), and Show Tabs and Commands (maximizes Ribbon)

Common Tabs and Their Uses:

  • Home Tab: Contains tools for cutting, copying, pasting, formatting font and paragraph, and managing slides
  • Insert Tab: Used to add elements such as pictures, shapes, charts, links, text boxes, video and more
  • Design Tab: Used to add a theme or color scheme, or to format the slide background
  • Transitions Tab: Used to control how slides change from one to the next
  • Animations Tab: Used to animate the movement of things on slides
  • Slide Show Tab: Used to set up the way you want to show your presentation to others

Using the Tell Me Feature:

  • A feature introduced from PowerPoint 2016
  • Find any commands that you want by looking up "the tell me" feature on the ribbon
  • The Ribbon contains the text "Tell me what you want to do..."

Presentation Views:

  • Normal View: The default view for creating and editing slides, allowing to move slides in the slide navigation pane
  • Slide Sorter View: Displays thumbnail versions of slides for easy reordering via drag and drop
  • Reading View: Fills the PowerPoint window with a preview of the presentation, including navigation buttons and displaying also the PowerPoint title bar
  • Slide Show View: Used to start the slide show of the presentation from the current slide

Other ways to view:

  • Outline View: Shows the slide text in outline form, allowing for direct editing
  • Slide Notes: Notes can be added to slides from the Notes pane for speaker reference
  • Zoom In and Out: The zoom control slider can be used to zoom in or out to slides
  • The current zoom percentage is displayed when you zoom in or out

Additional parts of Powerpoint:

  • The Slide pane in normal mode allows, moving slides by dragging and dropping, duplicating and deleting slides using hot keys, selecting slides to perform basic slide operations
  • Slide Area is where you add and edit slide objects
  • Task pane allows power point window options when some option in the ribbon tab has been clicked
  • Mini toolbar helps edit highlighted text, comprising familiar formatting tools
  • Backstage view comes into view when the slides or ribbons stop appearing when clicking file, it comes with various options(manage, see, managing settings)

Create a new Presentation:

  • Go to file, open backstage view, click new and create blank presentation
  • A new Presentation can be made from a template, by going to file tab, then open the backstage view, then select New and select template, then click create

Slide placeholders:

  • Slides are constructed with placeholders. Slides can contain various content that can be found in thumbnails

Components of a Slide:

  • Title Place Holder: Lets the user enter the title of a slide
  • Text Place Holder: Used to hold any text description to be displayed on a slide
  • Object Place Holder: Used to hold graphs and other objects to be displayed on a slide

Saving a presentation:

  • Presentation can bve saved going through backstage view selecting save as then browse
  • The save quick action can also be used as a quick save

Other operations on slide:

  • A slide can be insert clicking on the home Tab then slides, or can be done wit tell me
  • A text box can be inserted clicking on the insert tab, and edit by dragging the mouse

Working in Power Point:

  • The WordArt is used to work with special text effects, that can be found under the insert tab
  • Clip art can be inserted from media files or a Bing search from a insert tab
  • A picture or table can be added from the insert tab
  • A screenshot can be taken and added from the insert tab, with different image formats
  • Transitions are motion effects when slides are changed, and are applied to slides and its timings
  • Advance slides can be done manually or with a timed wait
  • Animation are a way to add effect to a text, image or shape, with certain styles and variations

The C Language basics

  • A general purpose, case sensitive programming language
  • The 'C' language is an widely used CUI based high level programming language
  • 'C' is a flexible, high level, structured programming language.
  • 'C' includes certain Low-Level features only in assemble or machine language
  • 'C' is largely machine independent allowing programs to be easily portable.
  • 'C' language is designed to be extensible for user libaries

More about C

  • To use a C program an IDE is required to be Downloaded
  • Each 'C' program has its own function with unique functions

Rules for Writing a C-Program:

  • Every 'C' Program needs a main() function, which is where program execution starts
  • program execution starts at the opening brace ({) and ends at the corresponding closing brace (})
  • Every program statement must end with a semicolon (;)
  • All variables used must be declared with their data types before use
  • When including header files with <#(hash), #include, note that the '#' must appear in the first column of the line
  • Each opening bracket must have an closing brackets
  • Comments (either opening or closing) can be placed in lines for developer notes

Details about sections

  • A header file (stdio.h) can be included by using" #include"
  • "stdio.h (Standard Input Output) is A header file, used to store input and output function, and a mathematical header file (math.) is used for Mathematical function

How can I comment

  • Comments help developers to understand the program but does not affect the output code
  • Can be written by first "//" , or with a "/* ---*/"

IDE for Beginners

  • Start the C Program by downloading the IDE, click start, and click c-free
  • Create a new ide and step by the next rule and step to write a program

How to print Hello World

  • First: placing header file
  • Second: write main() function, the word 'void' , is used when no values are needed to be returned
  • Third write statements
  • Fourth: close the brace

Details about The Environment to Run a Program

  • Compile = checking the result of the program for errors of any code
  • The result will be displayed on the lower part of the screen
  • Font size can be increased in the tools menu
  • Printf() is a function used to display the output "string" to the screen
  • This has to be under the header file
  • The comment line helps describe the actions of the code
  • Void main () - this is the main, has to return a value, and uses the print statement

Writing Statements

  • Writing "/" indicates a comment
  • Each Header line indicates its own function

Saving File and running file

  • After the code is written files can be saved for the future under save as or save
  • After finding The folder, the codes will be saved and can be worked

C Language functions

  • Used to categorize the data, its form and uses
  • Integer - Has 4 datatypes in C (Integer, Character, Float, Double)
  • These have specific Keywords that are reserved

Variables

  • Variable is A String of Values that are named so to store these values
  • It has rules when naming
  • First letter of the variable shouldnt be digit or any alphabets
  • No Variables as Keywords are allowed
  • No blank space in the variable name is allowed

Examples of Variables include

  • RATE, rate, _xyz, value etc.
  • Int a, Char C, Int a, A is for integer, C is character and Float Salary is a Float Function
  • Numeric Constant that have numeric digits that can be classified into two types
  • Integer has decimals, and can be real or integer
  • Constant characters - used under "" and it has zero or more than 1 character

Constants and Symbols

  • Certain symbols have actions to perform. ie New Line, Tab Backspace
  • The computer can use these conversions to specify sizes (%c or %d)

Operators

  • A symbol or letter acts on an operation, which in turn operates on something called an operand.
  • the following include: Arithmetic, Relational, Logical, Assignment, Increment and Decrement Operator
  • Arithmetic Operator: Used in mathematical Operation (+ - % etc..)
  • Relation: Helps to compare the values on operators. (!== etc)
  • The "&&, !!, !" logical statements returns '0' for false or '1`' for Truw
  • Assignment - Use one vale in variable ie(=) x=26. Assigns 26 to x ++ increment value, - - decrement the value

Examples:

  • C can run a string on different displays.

Printing Functions

  • Has important use code on the system to create a message
  • Getchar() gets the characters in the code, with a return to the function
  • can be used to get and read a single code, in keyboard

Function to put and run

  • Helps the function to put the values on the device, or write a short character
  • these characters or function are generally in the keyboard (gets())

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser