Amazon Technical Paper 2


15 Questions MCQ Test Placement Papers - Technical & HR Questions | Amazon Technical Paper 2


Description
This mock test of Amazon Technical Paper 2 for Quant helps you for every Quant entrance exam. This contains 15 Multiple Choice Questions for Quant Amazon Technical Paper 2 (mcq) to study with solutions a complete question bank. The solved questions answers in this Amazon Technical Paper 2 quiz give you a good mix of easy questions and tough questions. Quant students definitely take this Amazon Technical Paper 2 exercise for a better result in the exam. You can find other Amazon Technical Paper 2 extra questions, long questions & short questions for Quant on EduRev as well by searching above.
QUESTION: 1

In C, if you pass an array as an argument to a function, what actually gets passed?

Solution:
QUESTION: 2

What will be the output of the program?

#include

int main()

{

            viod fun( int, int[]);

            int arr[] = {1, 2, 3, 4};

int i;

            fun (4, arr);

for (i=0; i<4; i++)

            printf(%d, arr[i]);

return 0;

}

void fun(int n, int arr[])

{

            int *p=0;

int i=0;

while(i++ < n)

            p = &arr[i];

*p=0;

}

Solution:
QUESTION: 3

What will be the output of the program if the array begins 1200 in memory?

#include

int main()

{

Int arr[]={2, 3, 4, 1, 6};

printf(%u, %u, %u , arr, &arr[0], &arr);

return 0;

}

Solution:
QUESTION: 4

Which of the following statements are correct about an array?

1: The array int num [26]; can store 26 elements.

2: The expression num [1] designates the very first element in the array.

3: It is necessary to initialize the array at the time of declaration.

4: The declaration num [SIZE] is allowed if SIZE is a macro.

Solution:
QUESTION: 5

Which of the following function is used to find the first occurrence of a given string in another string?

Solution:
QUESTION: 6

What will be the output of the program in 16-bit platform (Turbo C under DOS)?

#include

Int main()

{

Printf(%d, %d, %d, sizeof(3.0f), sizeof(3)), sizeof(3.0);

Return 0;

}

Solution:
QUESTION: 7

Which of the following statements are correct ?

1:A string is a collection of characters terminated by .

2:The format specifier %s is used to print a string.

3: The length of the string can be obtained by strlen().

4:The pointer CANNOT work on string.

Solution:
QUESTION: 8

Point out the error in the program?

#incluse

int main()

{

struct emp

{

char name[20];

float sal;

};

struct emp e[10];

int i;

for(i=0; i<=9; i++)

scanf(“%s  %f e[i].name, &e[i].sal);

return 0;

}

Solution:
QUESTION: 9

What is the similarity between a structure, union and enumeration?

Solution:
QUESTION: 10

What will be the output of the program?

#include

int main()

{

enum days {MON=-1, TUE, WED=6, THU, FRI, SAT};

printf("%d, %d, %d, %d, %d, %d ", MON, TUE, WED, THU, FRI, SAT);

return 0;

}

Solution:
QUESTION: 11

What will be the output of the program ?

#include

struct course

{

int courseno;

char coursename[25];

};

int main()

{

struct course c[] = { {102,Java},

{ 103, PHP},

{104, DotNet}           };

printf(%d, c[1].courseno);

printf(%sm, (*(c+2)).coursename);

return 0;

}    

Solution:
QUESTION: 12

Point out the error in the program

#include

int main()

{

int I;

#if A

printf(Enter any number:);

scanf(%d, &i);

#elif B

printf( The number is odd);

return 0;

}

Solution:
QUESTION: 13

What are the different types of real data type in C?

Solution:
QUESTION: 14

What do the following declaration signify?i

nt *ptr[30];

Solution:
QUESTION: 15

Which of the following function is correct that finds the length of a string?

Solution:

Related tests