Which shape is used to represent a decision in a flowchart?
Diamond
A flowchart is a graphical representation of an algorithm or process, and it uses a set of standardised symbols so that any reader can interpret the logic at a glance. Choosing the right symbol conveys the type of step being performed.
The commonly used flowchart symbols are:
Because a decision requires the flow to split based on a condition, it is drawn as a diamond — the shape uniquely has multiple exit branches — making it the correct answer.
The parallelogram is wrong because it denotes input/output, not a branch. The oval is wrong because it marks the beginning or end of the flowchart. The rectangle is wrong because it represents a straightforward process step with a single entry and single exit, whereas a decision needs two or more outgoing paths.
Consider the following code snippet in C programming language.
int n = 5;
int m = n++;
What is the value of m after execution?
Which statement is TRUE about if statement in the C programming language?
You need to read a floating-point value from the user in the C programming language. Which of the following statements correctly performs this task?
What are the statements that begin with # symbol called in C programming language?
What is the output of the give C language code snippet?
void f(int x)
{
x = x + 5;
}
int main()
{
int a = 10;
f(a);
printf("%d",a);
return 0;
}
In object-oriented programming, which keyword ensures that a member variable belongs to the class itself rather than to any specific object, thereby allowing all instances to share a single copy of that variable?
The condition num! = 65 cannot be replaced by
Which statement is false?
The three basic structure types used to write the algorithm for a program are sequence, selection and repetition. Which of the following is NOT an advantage of using only these structures when writing the algorithm for a program?
Consider the following recursive Java function f that takes two long arguments and returns a float value:
public static float f (long m, long n) {
float result = (float)m / (float)n;
if(m < 0 | n < 0) return 0.of;
else result - = f(m * 2,n * 3);
return result ;
}
Which of the following real values best approximates the value of f (1, 3) ?