C++ Basics – Telegram
393 subscribers
142 photos
8 videos
17 files
49 links
For Any Information @TechnerdGuy
🆘 Pre-Engineering Students Struggling with C++? 😥 Fear not! 💪 This channel is your coding lifesaver! 🚑 Learn the basics, ace your course! 💯
Download Telegram
Question


1.  What is Machine Language primarily composed of?
    a) English words
    b) Binary code (0s and 1s)
    c) Mnemonic codes
    d) High-level commands

2.  What is the purpose of an Assembler?
    a) To translate High-Level Language into Machine Language
    b) To translate Machine Language into Assembly Language
    c) To translate Assembly Language into Machine Language
    d) To execute code line by line

3.  Which characteristic best describes High-Level Programming Languages?
    a) Difficult for humans to read and write
    b) Directly understandable by computers
    c) Easy for humans to read and write
    d) Based on binary code

4.  What is the key difference between a Compiler and an Interpreter?
    a) A Compiler executes code line by line, while an Interpreter translates the whole code at once.
    b) An Interpreter translates the whole code at once, while a Compiler executes code line by line.
    c) A Compiler translates the whole code into machine code before execution, while an Interpreter translates and executes code line by line.
    d) There is no difference between a Compiler and an Interpreter; they perform the same function.



True/False

1.  Machine Language is directly understandable by humans.

2.   High-Level Programming Languages can be executed directly by a computer without translation.
👍14👎1
Forwarded from MA♤♤
1. B
2. C
3. C
4.C

1. False
2. False
👍8🔥4
Esk ahun cover kadergnew wust yalegebachu negr......?
Esh understand adergachuwal slezi yehone teyak letyekachu


Ye C++ code run lemaderg yemtetkemut application or software compiler or interpreter nw mebalew.....?

Compilation vs. interpretation
Computer programming የአንድ programming language elements  የሚፈለገውን ውጤት እንዲያመጡ በቅደም ተከተል የማቀናበር ተግባር ነው። The effect could be different in every specific case - it's up to the programmer's imagination, knowledge and experience.

ይህ composition ደግሞ ትክክል መሆን አለበት in many senses:

#alphabetically - አንድ program ግልፅ በሆኑ ፊደላት መፃፍ አለበት።

#lexically - እያንዳንዱ programming language የራሱ dictionary አለው; ይህ ደግሞ ከnatural language dictionary በብዙ ቀለል ያለ ነው።

#syntactically - እያንዳንዱ ቋንቋ የራሱ ይሆነ ህግ አለው እናም they must be obeyed for communication to occur

#semantically - the program has to make sense
ነገር ግን program የፃፈው ሰው ሊሳሳት ይችላል የዚያን ጊዜ ደግሞ Each of them can cause the program to become completely useless.

ለምሳሌ አንድ program በትክክል ፅፋችኋል ብለን እናስብ፣  ኮምፒውተራችን ይሄን program execute እንዲያረግልን በምንድ ነው የምናሳነየው?🤔

የፆፍነውን program in to  a machine language render ማረግ ይኖርብናል፣ Luckily, the translation can be done by a computer itself, making the whole process fast and efficient.

High Programming Language ወደ machine language የምንቀይርባቸው ሁለት መንገዶች አሉ:



#1_COMPILATION - source program አንዴ translated ይሆናል (however, ይህን each time source code በተቀያየረ ቁጥር modify እናረጋለን by getting a file (e.g., an .exe file if the code is intended to run under MS Windows) machine code የያዘ ማለት ነው; then create ያረግነውን file  distribute ማረግ እንችላለን ; ይሄንን translate የሚያረግልን program  compiler ወይም translator ይባላል።

Eg of compiled languages: C, C++, C#



#2_INTERPRETATION - የአንድ written code ተጠቃሚ ሁሉ source program each time run ማረግ ሲፈልግ translateያረገዋል; ይሄንን የሚያረግልን program ደግሞ interpreter ይባላል፣ አስተርጓሚ እንደማለት ነው። ምክኒያቱ ደግሞ everytime code execute በፈለግን ቁጥር ስለሚተረጉምልን ነው። interprets the code every time it is intended to be executed;

ይህ ማለት ደግሞ source code ልክ እንዳለ distribute ማረግ አንችልም ማለት ነው፣ ምክንያቱም the end user codeኡን execute ለማረግ   አስተርጓሚ(interpreter) ያስፈልገዋል።

Eg of Interpreted languages: Python, JavaScript

Any programming language ከእነዚህ ከሁለቱ መካከል ነው የሚመደበው።

There are very few  languages that can be both compiled and interpreted. usually,  compiled programs run faster than interpreted programs.
👍18🤔2😍1
Ahun gebtewuchewal adel.....
👍6
Algorithm 🔄

An algorithm is a finite set of well-defined instructions or steps designed to solve a specific problem or perform a particular task. Algorithms can be expressed in various forms, including natural language, pseudocode, and programming languages.



Designing Algorithms 🛠️

Algorithms can be designed using several techniques and tools. One effective tool for designing algorithms is the flowchart 📊.


Flowchart

A flowchart is a graphical representation of the steps involved in a process or algorithm. It uses standardized symbols and arrows to illustrate the flow of control and the sequence of operations. Flowcharts provide a visual way to understand complex processes, making it easier to identify the steps needed to solve a problem.

Common Symbols Used in Flowcharts:

Oval 🔵: Represents the start and end points of the process.

Rectangle 🟥: Indicates a process or action step.

Diamond ♦️: Represents a decision point that requires a yes/no or true/false response.

Arrow ➡️: Shows the direction of flow from one step to another.

. Parallelogram : Input /output operation
👍6👌1
Draw flowchart
Draw flowchart

Find the largest of three number x,y,z
I think that's enough for today.  Thank you to all of you, especially to the students who actively participated.🙏
👍8🔥1
How was today's class
Anonymous Poll
94%
Good.
6%
😣not good.
🔥5👍1
C++ Basics
How was today's class
Pls vote adergu.....😣
Please 🙏🙏kindly share this channel with other students.

Good Night😴
👍5
Hey Guys???

What's the difference between program and algorithm ....?
🤔3👍1
Algorithm:

• An algorithm is a step-by-step procedure or a set of well-defined instructions designed to solve a specific problem or perform a particular task.

Language Independent:  Algorithms are independent of any specific programming language. You can describe an algorithm using:
    Natural Language:  Like English, as you mentioned. This is often used for initial design and communication, making it easy for humans to understand.
    Pseudocode:  A more structured way to describe algorithms, resembling programming code but without strict syntax. It's still human-readable and language-agnostic.
    Flowcharts:  Graphical representations of algorithms using symbols and arrows to show the sequence of steps.
    Mathematical Notation: For algorithms in areas like mathematics and computer science theory.

• Algorithms focus on the logic and steps required to solve the problem, not on how to write it in a particular programming language.



Program:

• A program is the actual implementation of an algorithm in a specific programming language. It's the algorithm translated into a form that a computer can understand and execute.

Language Dependent: Programs are completely dependent on programming languages. You must use the syntax and rules of a specific language (like Python, Java, C++, JavaScript, etc.) to write a program.


   
Focus on Implementation: Programs focus on the concrete steps to implement the algorithm using the features and syntax of a chosen programming language.
🔥4👍3🤔2💯2
General Knowledge


Ada Lovelace: The First Computer Programmer |

@ProgrammingWithFaith
🥰10🔥31