Save
comp prog
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Yvan Raphael
Visit profile
Subdecks (1)
4, 5, 6,
comp prog
92 cards
Cards (153)
A function named CS that does not accept value and does not return a value is represented as void CS();
Call the function CS.
CS();
The function named MI that does not accept but returns an integer value is represented as
int MI();
Call function
MI.
The function named CSMI that accepts an integer and returns a character is represented as
char CSMI(int x);
The function named CCMIT that accepts two integers and returns a double is represented as
double CCMIT( int x, int y).
Call function CCMIT using printf statement.
printf("%lf", CCMIT(x, y));
The function named MAX that requires two integers and returns an integer is represented as
int MAX(int x, int y)
The function named TEST that accepts an integer and returns a floating point value is represented as
float TEST (int x);
The function declared as SITA() can be called as
int SITA/ INT SITA.
The function declared as int ARLEN(float); will accept what data type?
FLOAT.
The operator that indicated the value of an address is represented as
&.
Call function
TEST
and assign the result to variable.
A = TEST(x);
The process of executing repeatedly a portion of the program until logical condition is satisfied.
LOOPS
Parameters that accept value/s being passed to a function is called
FORMAL VARIABLE PARAMETER
What is the proper way of calling the function int GIANNE (char X)?
GIANNE (X);
variable declared before the main program is known as
GLOBAL VARIABLE/S
A function declared as PAO(); returns what data type?
INTEGER
What do you call a variable that is known exclusive within the given function is called LOCAL VARIABLE/S
What is the proper way of calling the function declared as SITA()?
INT SITA()
The code that describes what function does is called
FUNCTION
The primary purpose of a computer program is to
execute a specific set of instructions.
A program's main component is its
algorithm.
A function in programming serves to group related code into a
modular
unit.
What is the main purpose of a compiler in programming?
To convert human-readable code into machine-related code.
What is the main purpose of a interpreter in programming?
To convert human-readable code into machine-related code.
What is the main purpose of a application in programming?
To create user interface for a software application.
Which of the following is NOT a type of a program?
System, Application, Library, Utility
Utility
What is the main purpose of a utility in programming?
To
convert human-readable code into machine-related code.
What is the result of the boolean expression ! 5 > 3 && 2 < 4?
TRUE
What is the result of the boolean expression !(5 > 3)?
!(1) = FALSE
What is the equivalent of the following if-else statement using a ternary operator in C?
if(x>y)
printf("x is greater than y ^ prime prime );
else printf("y is greater than x);
x >y? "x is greater than y ": "y is greater than x"
What is the output of the following code using a ternary operator in C? int a = 10 b = 20, c;
c= (a < b)? a: b;
printf("%d", c);
OUTPUT:
10
What is the difference between prefix and postfix decrement operators in C?
Prefix decrements the value of the variable before it used in an expression, while postfix decrements the value after it is used.
Which phase involves updating the program to ensure continued functionality?
Maintaining
What is the basic building block of a C program?
Data
What is the correct syntax for declaring a variable in C?a.type identifier;b. identifier type;c. identifier = value;d. value identifier,
type identifier
;
What is the result of int 5/2 in C?
2
What is the result of float 5/2 in C?
2.5
What is the purpose of input statements in C?
To read data from the user
What does the sequential control structure in C refer to?
Execution of statements in a specific order
What is the default flow of execution in a C program?
Sequential
23. Which of the following is a relational operator in C? + * == %
ANSWER:
=
=
What is the purpose of the return statement in C?
To return a value from a function
See all 153 cards