AMCAT Programming Quiz-1

Question 1

Time: 00:00:00
Which of the following is not a valid variable name declaration?

float PI = 3.14

float PI = 3.14

double PI = 3.14

double PI = 3.14

#define PI = 3.14

#define PI = 3.14

Int PI = 3.14

Int PI = 3.14

Question 2

Time: 00:00:00
Which of the following are visible global ?

Register

Register

Auto

Auto

Extern

Extern

Static

Static

Question 3

Time: 00:00:00
What will happen if we use void when supplying arguments?

It won't give its caller anything back.

It won't give its caller anything back.

It will give its caller something of value.

It will give its caller something of value.

May or may not be dependent on the function's specified return type; the provided parameters differ from the return type of the function.

May or may not be dependent on the function's specified return type; the provided parameters differ from the return type of the function.

It will return a result.

It will return a result.

Question 4

Time: 00:00:00
Which of the following pseudocode instructions are written with the steps to be taken in the correct order?

 

Sequence logic

Sequence logic

Selection logic

Selection logic

Iteration logic

Iteration logic

Looping logic

Looping logic

Question 5

Time: 00:00:00
Which is used to convert source code to target language

linker

linker

compiler

compiler

loader

loader

executer

executer

Question 6

Time: 00:00:00
How do references and pointers differ from one another?

Pointers store the address of a variable, whereas references serve as an alias for a variable.

Pointers store the address of a variable, whereas references serve as an alias for a variable.

Pointers and references are comparable.

Pointers and references are comparable.

A pointer points to a variable, whereas a reference holds the address of a variable.

A pointer points to a variable, whereas a reference holds the address of a variable.

While references maintain a variable's address, pointers serve as an alias for a variable.

While references maintain a variable's address, pointers serve as an alias for a variable.

Question 7

Time: 00:00:00
Which of the following convert high-level language program into machine language program?

Compiler

Compiler

Translator

Translator

Both a and b

Both a and b

None of the option

None of the option

Question 8

Time: 00:00:00
Which of the following how the location can be used?

 

 

attributes

attributes

data type

data type

links

links

Data objection

Data objection

Question 9

Time: 00:00:00
what will be the value of sum of following code?
#include<iostream>
using namespace std;
int main(){
int i=1;
int j=0, sum=0;
while(i<=3){
j = (i+1)*(i-2);
sum = i + (j-1)*(j-2);
i++;

}
return 0;
}

9

9

8

8

10

10

15

15

Question 10

Time: 00:00:00
What happens if the base condition in the recursion is not defined?

Stack underflow

Stack underflow

Stack Overflow

Stack Overflow

Empty Stack

Empty Stack

None

None

null
null