1/39
Practice flashcards for Week 1 of Software Engineering and C Programming, covering computer organization, hardware/software history, and basic C language structure.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is the definition of a computer according to the lecture notes?
A programmable electronic device designed to accept input data, process it in line with a sequence of instructions called programs, and provide output in the desired format.
Who observed the trend known as Moore's Law in 1965?
Gordon E. Moore, the co-founder of Intel.
What does Moore's Law state regarding microchips?
The number of transistors on a microchip doubles every two years, with a 50% reduction in cost.
What electronic component and memory type were used in the first generation of computers (1940s−1950s)?
Vacuum tubes and magnetic drums.
Which programming language and electronic component characterize the second generation of computers (1950s−1960s)?
Assembly language and transistors.
What is considered the most well-known input device?
The keyboard.
What is the role of the Control Unit (CU) in the Central Processing Unit?
It coordinates the operation of the processor and is known as the nerve centre because it fetches and decodes instructions, selects registers, and tells the ALU which operation to perform.
Which functional unit carries out calculations such as addition, subtraction, and logical operations like AND and OR?
The Arithmetic & Logic Unit (ALU).
What are the primary differences between RAM and ROM?
RAM is volatile and stores active programs and data temporarily, whereas ROM is non-volatile and stores permanent instructions.
Define a bit and a byte as described in the Memory Unit section.
A bit is either 0 or 1, and 8 bits make one byte.
What is the purpose of cache memory?
It stores frequently used data and instructions close to the CPU, making it faster than RAM to help the CPU access information quickly.
Identify four categories of fields where computer programs are widely used.
Web development, software applications, embedded systems, and Data Science & AI.
In programming languages, what is the 'Lexicon'?
The set of rules that determines which symbols, such as letters, digits, and punctuation marks, can be used in the language.
What does the 'Syntax' of a programming language determine?
The appropriate ways of collating symbols within a program.
What is meant by the 'Semantics' of a programming language?
The set of rules that determines the meaning and effect of valid program statements.
What are the two low-level languages mentioned in the notes?
Machine language (consisting of bits) and Assembly language (using alphanumeric code).
How many statements in machine code does one high-level language statement typically translate into?
One high-level statement translates into many lines of machine code instructions.
Who developed the C programming language and in what year?
Dennis M. Ritchie at AT&T Bell Laboratories in 1972.
What language was the predecessor to C?
The B language.
What is the formal name of the current update on the C standard document?
ISO/IEC 9899:2024.
List the six phases a C program typically goes through before execution.
Phase 1: Editor, Phase 2: Preprocessor, Phase 3: Compiler, Phase 4: Linker, Phase 5: Loader, and Phase 6: CPU.
What are the four key components of an Integrated Development Environment (IDE)?
Text/Code Editor, Compiler, Debugger, and Version Control System.
What is the purpose of the single-line comment and multi-line comment in C?
They represent nonexecutable instructions, used as // for single-line and /* ... */ for multi-line comments.
What does the preprocessor directive #include <stdio.h> signify?
It includes the standard input/output header file, which allows the program to use functions like printf and scanf.
What is the purpose of the escape sequence \n?
It is the NEWLINE sequence, which instructs the program to move the cursor to the beginning of the next line.
Describe the escape sequences \t and \a.
\t moves the cursor to the next horizontal tab stop, and \a produces a sound or visible alert.
Why are \\ and \" used in C strings?
\\ is required to insert a backslash character, and \" is required to insert a double-quote character because these symbols have special meanings in strings.
What is the role of the Linker in the program life cycle?
The Linker locates library functions (like printf), inserts the proper calls to them in the object program, and creates an executable file (.exe).
According to indentation conventions, what is the common number of spaces per indentation level?
Four spaces.
What does the scanf function do in C?
It reads input from the keyboard and stores the data in a memory location retrieved by the ampersand symbol (&).
What represent the integer format specifier and the long double format specifier in C?
%d for Int and %LF for long double.
What characters are allowed in a C identifier?
Letters, digits, and the underscore character (_).
What is the primary rule regarding the start of a C identifier?
An identifier must not begin with a digit.
What does it mean that C is 'case-sensitive' regarding identifiers?
It means that age, Age, and AGE are treated as three different and distinct identifiers.
In the addition program example, what is the purpose of the ampersand (&) in scanf("%d", &integer1);?
It tells scanf the location or address in memory where the entered value should be stored.
What are the format specifiers for float and double data types?
%f for float and %lf for double.
What is the formula to convert Celsius to Fahrenheit as used in Class Exercise 6?
Fahrenheit=(Celsius×59)+32
According to Tutorial 2, what is the formula for calculating total resistance (RT) in a parallel circuit?
RT=ITV
What does the term 'portable' mean in the context of high-level languages?
It means the language can run across various hardware architectures or platforms.
What memory unit is characterized as non-volatile secondary storage?
Examples include SSDs, HDDs, USB flash drives, memory cards, and optical discs.