Podcast
Questions and Answers
In the C programming language, the smallest individual unit is known as a ______.
In the C programming language, the smallest individual unit is known as a ______.
Token
C language has a total of ______ keywords.
C language has a total of ______ keywords.
32
A variable in C is used to store a ______.
A variable in C is used to store a ______.
value
An integer constant refers to a sequence of ______.
An integer constant refers to a sequence of ______.
Signup and view all the answers
Real constants, also known as ______ constants, have fractional parts.
Real constants, also known as ______ constants, have fractional parts.
Signup and view all the answers
A single character constant is enclosed within a pair of ______ quote marks.
A single character constant is enclosed within a pair of ______ quote marks.
Signup and view all the answers
Constants are referred to as fixed values that do not ______ during the execution of a program.
Constants are referred to as fixed values that do not ______ during the execution of a program.
Signup and view all the answers
The program written in high level language is shorter than the program written in ______ language.
The program written in high level language is shorter than the program written in ______ language.
Signup and view all the answers
Every high level language has a standard ______ approved by international organizations.
Every high level language has a standard ______ approved by international organizations.
Signup and view all the answers
High level language instructions are like ______ language statements.
High level language instructions are like ______ language statements.
Signup and view all the answers
To convert source code into machine code, we use either a ______ or an interpreter.
To convert source code into machine code, we use either a ______ or an interpreter.
Signup and view all the answers
Interpreters usually take less time to analyze the source code, while compilers usually take a ______ amount of time.
Interpreters usually take less time to analyze the source code, while compilers usually take a ______ amount of time.
Signup and view all the answers
The 'C' language was developed by ______ Ritchie in 1972.
The 'C' language was developed by ______ Ritchie in 1972.
Signup and view all the answers
'C' language is well suited for ______ programming.
'C' language is well suited for ______ programming.
Signup and view all the answers
There are only ______ keywords in 'C'.
There are only ______ keywords in 'C'.
Signup and view all the answers
Any problem/program is represented in the form of text, it is called ______.
Any problem/program is represented in the form of text, it is called ______.
Signup and view all the answers
Any problem/program is represented in the form of picture, it is called ______.
Any problem/program is represented in the form of picture, it is called ______.
Signup and view all the answers
The above symbol shows Start or End of the process in a ______.
The above symbol shows Start or End of the process in a ______.
Signup and view all the answers
The symbol of flowchart that shows processing in a ______.
The symbol of flowchart that shows processing in a ______.
Signup and view all the answers
Machine language consists of strings of binary numbers (0 and 1) and is the only one language the processor directly ______.
Machine language consists of strings of binary numbers (0 and 1) and is the only one language the processor directly ______.
Signup and view all the answers
Programming languages can be categorized into ______ level languages.
Programming languages can be categorized into ______ level languages.
Signup and view all the answers
Low level language can be further categorized into Machine language (1GL) and ______ language (2GL).
Low level language can be further categorized into Machine language (1GL) and ______ language (2GL).
Signup and view all the answers
High level languages include Procedural-Oriented language and Problem-______ language (4GL).
High level languages include Procedural-Oriented language and Problem-______ language (4GL).
Signup and view all the answers
Assembly language is also known as ______ language because programmer requires detailed knowledge of hardware.
Assembly language is also known as ______ language because programmer requires detailed knowledge of hardware.
Signup and view all the answers
The program is converted into machine code by an ______.
The program is converted into machine code by an ______.
Signup and view all the answers
High level languages are easier to learn because they use instructions similar to ______ language.
High level languages are easier to learn because they use instructions similar to ______ language.
Signup and view all the answers
Procedural programming languages determine the ______ and the order of those steps to produce a desired output.
Procedural programming languages determine the ______ and the order of those steps to produce a desired output.
Signup and view all the answers
Problem-Oriented languages allow users to specify what the output should be without describing all the details of how the ______ should be manipulated.
Problem-Oriented languages allow users to specify what the output should be without describing all the details of how the ______ should be manipulated.
Signup and view all the answers
Natural languages are still in a developing ______ where we can write statements resembling normal sentences.
Natural languages are still in a developing ______ where we can write statements resembling normal sentences.
Signup and view all the answers
The logic of programs written in high level languages is very simple and easy to ______.
The logic of programs written in high level languages is very simple and easy to ______.
Signup and view all the answers
Every high level language provides a large number of built-in functions or ______ functions that can be used during programming.
Every high level language provides a large number of built-in functions or ______ functions that can be used during programming.
Signup and view all the answers
In a 'C' program, the ability to extend the program itself is referred to as ______.
In a 'C' program, the ability to extend the program itself is referred to as ______.
Signup and view all the answers
To display 'Hello Computer', the function ______ is used.
To display 'Hello Computer', the function ______ is used.
Signup and view all the answers
The first line of the program usually contains the ______ for the main function.
The first line of the program usually contains the ______ for the main function.
Signup and view all the answers
The command to clear the screen in a C program is [blank()].
The command to clear the screen in a C program is [blank()].
Signup and view all the answers
The output of the program that displays the sum of two values is 'Sum : ______'.
The output of the program that displays the sum of two values is 'Sum : ______'.
Signup and view all the answers
The section that consists of comment lines giving the name of the program, author, and other details is called the ______ section.
The section that consists of comment lines giving the name of the program, author, and other details is called the ______ section.
Signup and view all the answers
The section that provides instructions for the compiler to link functions from the system library is called the ______ section.
The section that provides instructions for the compiler to link functions from the system library is called the ______ section.
Signup and view all the answers
In the basic structure of C programs, the user-defined functions are listed after the ______ function section.
In the basic structure of C programs, the user-defined functions are listed after the ______ function section.
Signup and view all the answers
A variable name must start with an alphabet or ______.
A variable name must start with an alphabet or ______.
Signup and view all the answers
A variable name in C can contain letters, digits, and ______.
A variable name in C can contain letters, digits, and ______.
Signup and view all the answers
In C, an integer typically uses ______ bytes of memory.
In C, an integer typically uses ______ bytes of memory.
Signup and view all the answers
The double type in C uses ______ bytes for storage.
The double type in C uses ______ bytes for storage.
Signup and view all the answers
A character type in C has a size of ______ byte.
A character type in C has a size of ______ byte.
Signup and view all the answers
The void type in C indicates ______ value.
The void type in C indicates ______ value.
Signup and view all the answers
The syntax for declaring a variable in C starts with the ______ type.
The syntax for declaring a variable in C starts with the ______ type.
Signup and view all the answers
To assign a value to a variable in C, the ______ operator is used.
To assign a value to a variable in C, the ______ operator is used.
Signup and view all the answers
Study Notes
Introduction to Programming
- Programming languages represent problems in text (algorithms) or picture form (flowcharts)
- Flowcharts use symbols to depict program steps:
- Start/End: Shows the beginning or end of a process
- Process: Represents a processing step
- Input/Output: Displays user input or program output
- Decision Box: Illustrates decisions or choices
- Flow Lines: Connects flowchart symbols to show the sequence of steps
Types of Programming Languages
- Two main types: low-level and high-level
- Low-Level Languages:
- Machine language (1GL): Uses binary code (0s and 1s), understood directly by the computer's processor, fast execution, efficient primary memory use
- Assembly language (2GL): Symbolic codes for machine instructions, requires hardware knowledge, translated into machine code using an assembler.
- High-Level Languages:
- Procedural (3GL): Specifies steps to achieve a desired outcome (e.g., Pascal, COBOL, C, FORTRAN)
- Problem-oriented (4GL): Focuses on the desired output rather than the detailed steps (e.g., Visual Basic, C#, PHP)
- Natural languages (5GL): Using human language-like statements, incorporates artificial intelligence (AI).
Characteristics of High-Level Languages
- Easy to learn: Close to human languages, making them easier to learn and use.
- Easier to detect and correct errors : Program logic is clear, thus error detection/correction is simpler.
- Machine independence: Programs can run on different computer systems without modification.
- Availability of Library functions: Offer ready-made functions to perform standard tasks, saving development time.
Overview of "C"
- Popular, structured, high-level programming language, machine independent.
- Developed by Dennis Ritchie in 1972.
- ANSI (American National Standards Institute) and ISO (International Standards Organization) approved the language in 1989 and 1990, respectively.
- "C" is robust, efficient, and fast.
- Large number of built-in functions and operators.
- 32 keywords.
- Well-suited for structured programming.
- Can extend programs.
C Tokens
- Smallest individual unit of a program called a 'token'.
- Includes keywords, constants, strings, and operators.
- Keywords are reserved words with fixed meanings.
- Identifiers are user-defined names for variables, functions, and arrays.
- Constants represent fixed values that do not change during program execution.
Basic Structure of "C" Programs
- Programs typically divided into sections:
- Documentation Section (comments): provides program information.
- Link Section: links program to libraries.
- Definition Section: defines symbolic constants
- Main function: contains declaration (variable definitions) and executable parts.
- User-defined functions
Executing "C" Programs
- Entering program into a "C" editor, saving.
- Compiling (Alt+F9 key).
- Checking for errors, and recompiling if needed.
- Running the program (Ctrl+F9 key).
Character Set, Variables, and Data Types
- Represents characters allowed in a "C" program for words, numbers and symbols.
- Variables store values that can be changed during program execution.
- First character must be an alphabet or underscore character.
- Used only letters, numbers, and underscores.
- Variable names of up to 31 characters are recognised.
- Variable names cannot contain spaces.
- Data Types specify the kind of data that variable will store.
- "C" supports primary, derived, and user-defined data types.
Integer Type
- Whole numbers (-2, -1, 0, 1, 2).
- Uses 2 bytes.
Floating Point Type
- Numbers with fractional parts, like decimals.
- Single-precision (float): 4 bytes.
- Double-precision (double): 8 bytes.
- Long double: 10 bytes.
Integer Variables
- Used to hold integer values.
- Decimals (e.g., 5, -10, 0).
- Octals (numbers starting with "0" digits 0-7).
- Hexadecimals (numbers starting with "0x," digits 0-9,a-f).
Floating Point Variables
- Used to hold floating-point values.
Character Type
- Single characters (letters, symbols).
- Uses 1 byte.
- Enclose with single quotes.
Void Type
- Represents the absence of an explicit value.
Declaration of Variable
- Tells the compiler variable name.
- Specifies the data type a variable holds.
- Can be int, float, char etc.
Assigning Value to Variables
- Use the assignment operator (=) to assign values to variables.
Defining Symbolic Constants
- Constants stored using symbolic names for better readability and reuse in programs.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz covers the fundamentals of programming languages, including the representation of algorithms and flowcharts. You'll learn about the different types of programming languages such as low-level and high-level, and their characteristics. Test your knowledge on how these concepts apply in real-world programming scenarios.