FOPR111

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

TRUE OR FALSE? Data Type is used in the definition of all variables to limit the kind of data that may be stored. As a result, data types are used to inform variables about the sorts of data they may hold.

TRUE

TRUE OR FALSE? Data Types are used to: Identify the type of a variable when it declared. Identify the type of the return value of a function. Identify the type of a parameter expected by a function.

TRUE

Which of the following lines is an example of proper declaration of a constant? A. #define num 25 B. #define num 25; C. #define 25; D. #define num = 25;

A. #define num 25

What operator in C can be used to get the memory address of a variable? A. & B. % C. $ D. @

A. &

Which one is a valid comment in C? A. // comment B. / comment C. \ comment D. \ comment

A. // comment

What is one way to define a constant in C? A. Using #define preprocessor directive B. Using a constant keyword C. Using #def preprocessor directive D. Using #constant preprocessor directive

A. Using #define preprocessor directive

Which of the following is true for variable names in C? A. Variable names cannot start with a digit B. Variable can be of any length C. They can contain alphanumeric characters as well as special characters D. Reserved Word can be used as variable name

A. Variable names cannot start with a digit

These are the units of memory that make up all the data types in C. A. bytes B. bites C. bits D. beets

A. bytes

Which of the following variables are properly declared and initialized? A. char letter = 'c'; B. char letter; C. letter = 0; D. char letter = e

A. char letter = 'c';

The following are not reserved words in C. Which one does not belong to the list? A. continue B. stop C. constant D. flow

A. continue

The following are not reserved words in C. Which one does not belong to the list? A. switch B. change C. swap D. trade

A. switch

Which punctuation is associated with multi-line comments? A. // B. /*...*/ C. \*...*\ D. \

B. /*...*/

These are used to inform variables about the sorts of data they may hold. A. Identifiers B. Data types C. Data checkers D. Data info

B. Data Types

The following words are not reserved words in C. Which one does not belong to the list? A. period B. break C. launch D. snacks

B. break

What is the proper syntax of defining a variable in C? A. data_type variable_name B. data_type variable_name; C. variable_name data_type; D. variable_name data_type

B. data_type variable_name;

Which of the following data types has the usual size of 4 bytes? A. short B. float C. double D. char

B. float

___________ are declarations for variables. This determines the type and size of data associated with variables. All the data types defined by C are made up of units of memory called bytes.

DATA TYPES

Aside from the one in the second question, what else is used to deal with memory addresses? A. # B. ^ C. * D. $

C. *

What is another way to define a constant in C? A. Using a define keyword B. Using #constant preprocessor directive C. Using a const keyword D. Using a constant keyword

C. Using a const keyword

Which of the following variables are properly declared without being initialized? A. int = my_number; B. int num = 1; C. int my_number; D. int num = 32;

C. int my_number;

It gives an explanation about the source code. Furthermore, they act as documentation in the source code. We include them to increase the readability of the program. Besides, comments make it easy for the programmer to remember the complex things added to the code.

COMMENTS

They are used in a programming language to document the program and remind programmers of what tricky things they just did with the code, or to warn later generations of programmers stuck with maintaining some spaghetti code.

COMMENTS

Which of the following lines is not an example of proper declaration of a constant? A. #define height 190 B. const char letter = 'C'; C. const float number = 3.14; D. #define width 185;

D. #define width 185;

What is commonly used to represent memory locations? A. Octal B. Decimal C. Binary D. Hexadecimal

D. Hexadecimal

Which of the following lines is an example of proper declaration of a constant? A. const PI = 3.14 B. const PI 3.14; C. constant double PI = 3.14 D. const double PI = 3.14;

D. const double PI = 3.14;

The following words are reserved words in C. Which one does not belong to the list? A. static B. continue C. auto D. manual

D. manual

TRUE OR FALSE? These reserved keywords in C Programming are used to change certain of the program's functionalities. In C, there are 42 keywords with predefined words that cannot be used as variable names. It is good practice to avoid using these keywords as variable name.

FALSE There are only 32 keywords

__________ are whole numbers that can have both zero, positive, and negative values, but no decimal values. For example, 13, 0, 1092.

INTEGERS or int

Flowchart symbol that used for input and output processes.

Input/output (parallelogram)

Constants refer to fixed values that the program may not alter once they're set. They are also called _______________. Constants can be of any of the basic data types and can be divided into Integer Numerals, Floating-Point Numerals, Characters, Strings and Boolean Values.

LITERALS

There is another type of comment that allows us to comment on multiple lines at once, they are multi-line comments. To write, we use the /*....*/ symbol. This type of comment is called.

MULTI-LINE COMMENTS

A ____________ variable provides a new name to an existing variable. The & operator has different uses and meanings according to the context in which it is used. The following section discusses the tasks the reference operator performs in C.

REFERENCE

A type of comment that starts with //. It starts and ends in the same line.

SINGLE-LINE COMMENT

TRUE OR FALSE? Data type is an attribute associated with a piece of data that tells a computer system how to interpret its value. Understanding data types ensures that data is collected in the preferred format and the value of each property is as expected.

TRUE

TRUE OR FALSE? In order to store multiple sorts of data in the program, we must first define a variable. So, in order to do various operations or activities with the data, we must first store it in the computer's memory. However, we can't recall the memory address where the data is kept. So, depending on the data type, we name the memory location with a variable name and size to access the data.

TRUE

TRUE OR FALSE? Keywords are predefined, reserved words used in programming that have special meanings to the compiler. As C is a case sensitive language, all keywords must be written in lowercase.

TRUE

A __________ is a name for a memory place where data is stored. Each of them has a type that governs the memory size and layout, the range of values that may be stored inside that memory, and the set of operations that can be applied to the theM.

VARIABLES

The __________ data type is an incomplete type. It means "nothing" or "no type". You can think of it as absent. This data type is mostly used in functions

VOID

What symbol is used to denote single and multidimensional subscripts in an array.

[ ] BRACKETS

This symbol is used in creating single line comment

\\ SLASH

________________ Function starts the program from this line. Without the main function, the program execution does not start. When the operating system runs a program in C, it gives the control of the computer to the C program. If a program consists of only one line of code in the main function, then the program can run successfully.

main ( ) FUNCTION

Data type that enables both positive and negative numbers to be stored.

signed

Data type that permits only positive values to be stored.

unsigned

COMPLETE THE SENTENCE _________ is a general-purpose, high-level language that ___________ originally developed for the __________ operating system. It can be used to develop software like operating systems, databases, compilers, and so on.

"C" "DENNIS RITCHIE" "UNIX"

This symbol is used by the compiler to transform your program before the actual compilation starts.

# PREPROCESSOR

The __________ is an excellent language to learn to program for beginners. That is why, despite being old, it is still a very popular language.

C PROGRAMMING LANGUAGE

They are the smallest individual unit in the C program. They are either keywords or identifiers, constants, variables, or any other symbol which has some meaning in C language. The C program may alternatively be thought of as a collection of different of them. Hence the syntax for C language defines how to use them together while writing the C language code.

C TOKENS

These symbol precedes all preprocessing directives A. : B. < > C. # D. " "

C. #

The following statements are conditional directives, except for one. Which one does not belong to the list? A. #if B. #elif C. #then D. #else

C. #then

This works in a similar way as a function call. A. Preprocessors B. Header Files C. Function like Macros D. #defined

C. Function like Macros

The following items are features of the C language. Which one does not belong to the list? A. Simple set of keywords B. Low-level memory access C. None of these D. Clean style

C. NONE OF THESE

This kind of error occurs when there is a missing semi-colon (;). A. Run-time error B. Logical error C. Syntax error D. Human error

C. Syntax error

This function is important for program execution. A. function() B. program() C. main() D. important()

C. main ( )

Because syntax mistakes are always recognized by the compiler, they are also known as ________________. In most cases, programmers can readily identify and correct these problems.

COMPILATION ERRORS

Flowchart symbol that indicates the flow of the algorithm. Connects symbols together

Flow lines and arrowheads

These are a collection of files that allow the user to incorporate preset functions based on his needs. You can add them using the preprocessor directive #include.

HEADER FILES

______________ has a series of predefined functions embedded in the header files in the C library. These functions are used to perform a specific task with the help of a header file.

HEADER FILES

This is one step used to show code hierarchy in a pseudocode.

INDENTION

What is the description of stdio.h

INPUT/OUTPUT FUNCTIONS

What punctuation is used to house a set of built-in functions?

LESS THAN AND GREATER THAN < >

What is the punctuation used to #include a pre-existing header file in C?

LESS THAN and GREATER THAN < >

______________ are used so that we can write our programs easily. Since them in programming languages are collections of prewritten code that users can use to optimize tasks.

LIBRARIES

A _________ is a set of built-in functions, created by the programmers of the C programming language. These built-in functions are used most of the time when making C programs.

LIBRARY

On what operating system does C run on?

LINUX

When a programmer makes mistakes in inputting the code's syntax or has typos, _________________ occur. Syntax mistakes arise when a programmer disregards the set of rules that govern the syntax of the programming language.

SYNTAX ERRORS

Flowchart symbol that represents a subsequence of steps that perform one single task embedded within a larger process. Has a separate flowchart to describe the process in detail. Usually used when making functions in coding

Subroutine Symbol

What operating system was C originally developed for?

THE UNIX OPERATING SYSTEM

TRUE OR FALSE? A header file contains functions that you could use in your program.

TRUE

TRUE OR FALSE? A pseudo code's major objective is to describe what each line of a program should accomplish, making the code building step easier for the programmer.

TRUE

TRUE OR FALSE? Any programming language requires a specific syntax for the program to run. The syntax is the proper way for programmers to communicate with the computer.

TRUE

TRUE OR FALSE? C is a case-sensitive language so all C instructions must be written in lower case letters. main is not the same as MAIN.

TRUE

TRUE OR FALSE? If there isn't any existing header file that contains the function that we need in our program, then we can create our own header file which contains that function.

TRUE

TRUE OR FALSE? If you know C, you will have no problem learning other popular programming languages, such as Java, Python, C++, C#, etc., as the syntax is nearly similar.

TRUE

TRUE OR FALSE? Run-time errors can arise for a variety of causes. The following are some of the reasons: MISTAKES IN THE CODE, MEMORY LEAKS, MATHEMATICALLY INCORRECT OPERATIONS, UNDEFINED VARIABLES.

TRUE

TRUE OR FALSE? The #include preprocessing directive is used to include the header files with the .h extension in the program.

TRUE

TRUE OR FALSE? The absence of a semicolon at the end of any statement will mislead the compiler to think that this statement is not yet finished and it will add the next consecutive statement after it, which may lead to a compilation(syntax) error

TRUE

TRUE OR FALSE? The main part of code is the code that is called by the compiler to execute the program. Hence, any code that is typed inside the main function's curly braces ({}) is where the program execution begins. If the whole program is a room, then the main() function is the door, the entry point.

TRUE

TRUE OR FALSE? The programming language "C" is said to be the mother language.

TRUE

TRUE OR FALSE? The symbols' shape is what is important in making the flowchart. Any colors used depending on the user's preferences are acceptable.

TRUE

TRUE OR FALSE? return 0 is the exit status code of the program. On most operating systems, returning 0 is a success status which means the program worked fine until the end, without errors.

TRUE

Flowchart symbol that represents the start and the end of a flowchart. A flowchart should always start with and end with a symbol like this

Terminal (Start/End) (oval)

Type of header files that are defined by the user and can be imported using #include.

USER-DEFINED HEADER FILES

To use a header file, whether they are pre-defined or user-defined, we use the __________ preprocessor. The _______ preprocessor tells the compiler that the header file must be processed before compilation and that it contains all of the essential data type and function definitions.

#include

They are special symbols that are used to call functions and pass parameters to them.

( ) PARENTHESIS

This symbol it is used to create a pointer variable.

* ASTERISK

This symbol is used to separate multiple statements, such as parameters in function calls.

, COMMA

In the C/C++ programming language, the header files have an extension of ______.

.h

This symbol is an operator who calls up an initialization list.

: COLON

This symbol is a statement terminator that marks the end of one logical entity.

; SEMICOLON

This symbol it is used for assigning values.

= ASSIGNMENT OPERATOR

What punctuation is very important in ending any statement in C? A. ; B. : C. . D. ,

A. ;

These are collections of files that allow the user to incorporate preset functions based on his needs. A. Header files B. Library files C. Asset files D. Source files

A. Header files

This transforms your program before it is compiled. A. Preprocessors B. Header Files C. Function like Macros D. #defined

A. Preporcessors

This kind of error occurs when the programmer has not defined a certain variable in the code. A. Run-time error B. Logical error C. Syntax error D. Human error

A. Run-time error

What does INCREMENT mean?

ADD or ADDITION

Every aspect of computer science employs ____________. They are the backbone of the field. In computer science, It is a collection of instructions that allows a computer to perform any task, such as operating a calculator or launching a rocket.

ALGORITHM

______ are used for calculation, data processing, and automated reasoning. Whether you are aware of it or not, algorithms are becoming a ubiquitous part of our lives.

ALGORITHM

an __________ is simply a set of steps used to complete a specific task. They're the building blocks for programming, and they allow things like computers, smartphones, and websites to function and make decisions.

ALGORITHM

Flowchart symbol that represents arithmetic operations and data manipulations

Action or Process (Rectangle)

Flowchart symbol that used to represent a single step or action. Usually represents arithmetic operations and data manipulations. Most common flowchart symbol

Action or Process (Rectangle)

What are plain simple text that are not compiled in the compilation process? A. Documents B. Comments C. Messages D. Notes

B. Comments

This contains the set of predefined standard library functions. A. Preprocessors B. Header Files C. Function like Macros D. #defined

B. Header Files

This kind of error occurs when the programmer has a mistake in the order of their calculation. A. Run-time error B. Logical error C. Syntax error D. Human error

B. Logical error

This tests whether a certain macro is defined or not. A. Preprocessors B. Header Files C. Function like Macros D. #defined

D. #defined

Which of the following statements about header files is not true? A. They are where the names of all the headers that will be utilized or consumed in the main code file are listed. B. The function prototypes are present in them. C. They contain constants and data types utilized by the libraries. D. These files have a .header extension at the end.

D. THESE FILES HAVE A .HEADER EXTENSION AT THE END. It must only be .h

This is the process of diagnosing and fixing errors in our code.

DEBUGGING

Flowchart symbol that represents a decision-making point. Usually has flow lines coming out after it, representing the decision paths for each alternative (e.g., YES, NO)

Decision (Diamond)

An _______ is a flaw or defect in a program that causes the program to behave abnormally.

ERROR

TRUE OR FALSE? C isn't versatile; You cannot execute a C program code in any operating system. It is platform-independent. The C programming language is also considered the bottom of hardware programming.

FALSE C IS VERSATILE; You CAN execute a C program code in any operating system. It is platform-independent. The C programming language is also considered the BOSS of hardware programming.

TRUE OR FALSE? Comments are plain simple text in a C program that is compiled in the compilation process.

FALSE Comments are plain simple text in a C program that is NOT compiled in the compilation process.

TRUE OR FALSE? Since pseudocode is read by people rather than computers and has fewer strict constraints than a programming language, everyone tends to express information samely when creating it.

FALSE Since pseudocode is read by people rather than computers and has fewer strict constraints than a programming language, everyone tends to express information DIFFERENTLY when creating it.

TRUE OR FALSE? The C language includes high-level memory access, a complex set of keywords, and a clean style.

FALSE The C language includes LOW-level memory access, a SIMPLE set of keywords, and a clean style.

TRUE OR FALSE? The syntax of the C programming language is harder to learn and implement. The C programming language is fast and efficient. C offers a fast compilation time for its users. In C, programs and codes are executed faster than in any other programming language.

FALSE The syntax of the C programming language is EASY to learn and implement. The C programming language is fast and efficient. C offers a fast compilation time for its users. In C, programs and codes are executed faster than in any other programming language.

TRUE OR FALSE? We can include the same header file twice in any program.

FALSE We CAN'T include the same header file twice in any program.

TRUE OR FALSE? Even you have your header file, you still have to repeat an implementation of a certain function over and over again. This means that if you have already implemented a certain function and placed it in a header file you also created, you can just "import/include" that header file and you can make use of that same function

FALSE With header files, you DON'T have to repeat an implementation of a certain function over and over again. This means that if you have already implemented a certain function and placed it in a header file you also created, you can just "import/include" that header file and you can make use of that same function

In programming, an algorithm's visual representation is what we call _________. These are visuals that are composed of different shapes and arrows which signifies the flow of your algorithm.

FLOWCHART

It is a diagram that shows a system, a process, or an algorithm for a computer. It includes a summary of the crucial steps to addressing the problem in addition to being a diagrammatic representation of the solution to a specific problem.

FLOWCHART

Using __________ when creating and planning a process can help you pinpoint each step's importance while also giving you a sense of the process' overall structure. It arranges the tasks chronologically and categorizes them according to kind, such as process, decision, data, etc.

FLOWCHART

are graphical representations of an algorithm. Simply put, this is just your algorithm but is more visual which makes it easier to understand.

FLOWCHART

You can also define macros that work in a similar way as a function call, this is known as ________________

FUNCTION-LIKE MACROS

After compiling and running a program, we don't always obtain the results we intended. These types of errors are called ________________. They occur when we believe our code is right because it compiles without problems and runs without errors, but the outcome is not what we intended.

LOGICAL ERRORS

A ____________ is a fragment of code that is given a name. You can define it in C using the #define preprocessor directive.

MACRO

In a normal spoken language or a computer programming language, syntax means how to arrange words, characters, special characters, to make a meaningful statement, or expression, etc. We therefore need to study the syntax of a programming language so we can properly communicate with the computer. With proper syntax, errors can be _________________., therefore,

MINIMIZED

NO ANSWERS NEEDED IN THIS CARD! JUST FLIP IT. RULES IN WRITING PSEUDOCODE -Keep your statements independent of programming languages. -Use the problem's name domain rather than the implementation's. -Keep it readable, clear, and simple.

NO ANSWERS NEEDED IN THIS CARD! JUST FLIP IT. RULES IN WRITING PSEUDOCODE -Capitalize the first letter of every word (often one of the main 6 constructs). -Per line, just one statement is allowed. -To demonstrate hierarchy, enhance readability, and highlight nested structures, and indent. -Always use one of the Finish keywords to end multiline sections (ENDIF, ENDWHILE, etc.).

Flowchart symbol that usually come in pairs; Used to connect the flowchart portion in a different page. Must have a letter placed inside the symbol. Usually used when writing flowcharts that need more than one page

Off-page connector

Flowchart symbol that usually come in pairs; Indicates that the flow continues where the matching symbol (with the same letter) has been placed. Must have a letter placed inside the symbol

On-page connector (circle)

What punctuation is used to house program execution in C?

PARENTHESIS ( )

Type of header files which are already available in C/C++ compiler we just need to import them.

PRE-EXISTING HEADER FILES

The ___________________ are never terminated with a semicolon unlike what we usually see where we usually end every code with a semicolon.

PREDECESSORS

A ________________ transforms your program before it is compiled. Inclusion of header files, macro expansions, and other changes are examples of these transformations.

PREPROCESSOR

The commands of the preprocessor are known as _________________________.

PREPROCESSOR DIRECTIVES

Algorithms and prototypes are frequently developed, designed, or planned using it. Flowcharts and UML diagrams are two graphical representations of algorithms that can be used instead of it.

PSEUDOCODE

Assists in the communication between the program and the algorithm or flowchart. Also serves as a rough manual, allowing one developer's software to be easily understood when put down in it. The documentation strategy is critical in industries. That's when it comes in handy.

PSEUDOCODE

is used to describe a process or algorithm's steps clearly and succinctly without the use of a particular syntax or piece of code. It is solely intended to be read and understood by humans; it is not compiled or executed by computers.

PSEUDOCODE

What is the punctuation used to #include a user-defined header file in C?

QUOTE MARK " "

Errors that occur during the execution (or running) of a program are called _________________. These problems appear after the software has been correctly compiled. When a program is running, and it is not able to perform any particular operation, it means that we have encountered a _______________.

RUN TIME ERRORS

Special characters or __________ (single or sequence of characters) are characters that have a "special" built-in meaning in the language and they can not be used as identifiers. In computer programming, a primitive data type with a distinct human-readable form is referred to as ___________-.

SYMBOLS

___________ is the set of rules that must be followed while developing a program. To achieve the intended set of results, appropriate syntax must be followed when coding.

SYNTAX

What is a common exit status on most operating systems?

return 0;

These symbol marks the beginning and end of a block of code that contains more than one executable statement by opening and closing it.

{ } CURLY BRACKETS


Kaugnay na mga set ng pag-aaral

Ch 15 Job Advancement and Changes

View Set

Bowel obstruction (small, large, volvulus)

View Set

Skipper Unit 5 Anger and Annoyance -Animals

View Set