0% found this document useful (0 votes)
627 views2 pages

Amcat Automata

This document contains a technical skills assessment test with 10 multiple choice questions covering topics in C programming. The test has a duration of 20 minutes. For each correct answer, the test taker receives 1 mark, and there is no penalty for incorrect answers. The questions cover topics such as data sizes, loops, comments, arrays, pointers, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
627 views2 pages

Amcat Automata

This document contains a technical skills assessment test with 10 multiple choice questions covering topics in C programming. The test has a duration of 20 minutes. For each correct answer, the test taker receives 1 mark, and there is no penalty for incorrect answers. The questions cover topics such as data sizes, loops, comments, arrays, pointers, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

FACE TCS17-03T

TEST CODE : TCS17-03T


Total number of question : 10
Test duration (min) : 20 min
Correct attempt (mark) :1
Wrong attempt (mark) : Nil

TECHNICAL Answer: D

Certain questions are self-explanatory. Thus detailed 5. In the context of the following printf() in C, pick the
solutions are provided only wherever required. best statement.
i) printf("%d",8);
1. Assume int is 4 bytes, char is 1 byte and float is 4 ii) printf("%d",090);
bytes. Also, assume that pointer size is 4 bytes (i.e. iii) printf("%d",00200);
typical case) iv) printf("%d",0007000);
char *p; a. Only i) would compile. And it will print 8.
int *q; b. Both i) and ii) would compile. i) will print 8 while ii)
float *r; will print 90
c. All i), ii), iii) and iv) would compile successfully and
sizeof(p); they will print 8, 90, 200 & 7000 respectively.q
sizeof(q); d. Only i), iii) and iv) would compile successfully. They
sizeof(r); will print 8, 128 and 3584 respectively.
a. 4 4 4 b. 1 4 4
c. 1 4 8 d. None of the mentioned Answer: D

Answer: A Explanation:
As per C standard, "An octal constant consists of the
Explanation: prefix 0 optionally followed by a sequence of the digits
Irrespective of the type of pointer, the size for a 0 through 7 only."So 090 isn’t valid because 0 prefix is
pointer is always same. So whether it’s pointer to char used for octal but 9 isn’t valid octal-digit.
or pointer to float, the size of any pointer would be
same. Even size of a pointer to user defined data type 6. What’s going to happen when we compile and run
(e.g. struct) is also would be same. the following C program?
a. Compile Error.
2. Continue statement used for b. No compile error but it will run into infinite loop
a. to continue the next line of code printing FACE
b. to stop the current iteration and begin the next c. No compile error and it’ll print FACE 10 times
iteration from the beginning d. No compile error but it’ll print FACE 9 times.
c. to handle runtime error
d. None of the mentioned Answer: C

Answer: B Explanation:
Basically, even though for loop doesn’t have any of
3. What will be the output of following program? three expressions in parenthesis, the initialization,
a. error b. 0 c. 10 d. Garbage value control and increment has been done in the body of
the loop. So j would be initialized to 0 via first if. This if
Answer: B itself would be executed only once due to i--. Next if
and else blocks are being used to check the value of j
4. What is the use of \r in C? and existing the loop if j becomes 10. Please note that j
a. used to insert a vertical tab is getting incremented in printf even though there’s no
b. used to insert a tab format specifier in format string. That’s why FACE
c. places cursor at the end of line would be printed for j=0 to j=9 i.e. a total of 10 times.
d. places cursor at the start of line
______________________________________________________________________________________________________
Focus Academy for Career Enhancement Page 1 of 2
FACE TCS17-03T
7. The compiler in C ignores all test till the end of line
using
a. // b. /
c. */ d. None of the mentioned

Answer: A

8. UML Meaning is
a. Unique modeling language
b. Unified modeling language
c. Unified modern language
d. Unified master language

Answer: B

9. Disadvantage of array in C is
a. We can easily access each element
b. It is necessary to declare too many variables
c. It can store only one similar type of data
d. None of the mentioned

Answer: C

10. What is wild pointer in C


a. a pointer which we need to write in future
b. a pointer which has had naming convention
c. a pointer which had no limit
d. a pointer which has not initialized

Answer: D

______________________________________________________________________________________________________
Focus Academy for Career Enhancement Page 2 of 2

You might also like