Quiz For All

0%

Programming Skills - NAT (National Aptitude Test)

Programming Skills refers to the Computer Science portion of the National Aptitude Test (NAT), a standardised test for admissions in Pakistan.

1 / 50

Which of these is a Boolean data type?

2 / 50

In a switch statement, which keyword is used to terminate a case?

3 / 50

Which of the following is a logical operator?

4 / 50

What will this loop print? for(int i=0; i<3; i++) { printf("%d ", i); }

5 / 50

What is the primary purpose of a variable in programming?

6 / 50

Which data type is used to store decimal numbers like 3.14?

7 / 50

Which loop is best used when the number of iterations is unknown beforehand?

8 / 50

What does the ++ operator do?

9 / 50

Which symbol is commonly used in pseudocode to represent an output operation?

10 / 50

What is the main advantage of using a function in a program?

11 / 50

A flowchart symbol shaped as a parallelogram typically represents:

12 / 50

Which of the following is a valid function call for a function defined as void display()?

13 / 50

What is the final value of x after this code executes? int x = 5; x = x + 2;

14 / 50

What is the purpose of an if statement?

15 / 50

What does the following code do? while(condition) { // code }

16 / 50

What is the primary characteristic of the Bubble Sort algorithm?

17 / 50

Which operator has the highest precedence in the expression 5 + 3 * 2?

18 / 50

 If a is 10 and b is 3, what is the value of a % b?

19 / 50

The printf function in C is used for?

20 / 50

Which of the following is a comparison operator?

21 / 50

Which of the following is a syntactically correct variable name?

22 / 50

The process of combining two strings is called?

23 / 50

Which keyword is used to define a constant value that cannot be changed?

24 / 50

What is the main purpose of an algorithm?

25 / 50

What is the purpose of comments in source code?

26 / 50

Which protocol is primarily used for securely transferring web pages over the internet?

27 / 50

 Which searching algorithm requires the list to be sorted for it to work?

28 / 50

Which of the following best describes an algorithm?

29 / 50

In an array, all elements must be of the same?

30 / 50

 In a do-while loop, the condition is checked?

31 / 50

The expression !(5 > 3) evaluates to:

32 / 50

What is the value of arr[2] after the code int arr[] = {10, 20, 30, 40}; is executed?

33 / 50

What is the term for a variable that is declared inside a function?

34 / 50

What is the role of a compiler?

35 / 50

 In programming, a sequence of characters is called a?

36 / 50

What is the primary goal of a sorting algorithm?

37 / 50

Which of the following is the correct way to write an assignment statement?

38 / 50

The process of finding and fixing errors in a program is called?

39 / 50

What is the result of the expression 15 / 4 in integer division?

40 / 50

Which data type is most suitable for storing a single character like 'A'?

41 / 50

How many times will the body of this loop execute? for(int i=5; i>0; i--) { }

42 / 50

What is the value of resultint result = (10 == 10);

43 / 50

Which control structure is used to execute a block of code a specific number of times?

44 / 50

A function is defined as int calculate(int a, int b). What does the int before calculate signify?

45 / 50

Which part of a function is known as its signature?

46 / 50

 In pseudocode, the statement SET count = 0 is equivalent to?

47 / 50

What is the purpose of the else part in an if-else statement?

48 / 50

In an array int scores[5];, what is the index of the first element?

49 / 50

Which of the following is a key step in the Linear Search algorithm?

50 / 50

 In a flowchart, what shape is used to represent a decision?

Your score is

The average score is 62%

0%

Scroll to Top