C++ Institute CLP Certified Professional Programmer (CLP-12-01) Certification Sample Questions

CLP Certified Professional Programmer Dumps, CLP-12-01 Dumps, CLP-12-01 PDF, CLP Certified Professional Programmer VCE, C++ Institute CLP-12-01 VCE, C++ Institute CLP - C PDFThe purpose of this Sample Question Set is to provide you with information about the C++ Institute CLP - C Certified Professional Programmer exam. These sample questions will make you very familiar with both the type and the difficulty level of the questions on the CLP-12-01 certification test. To get familiar with real exam environment, we suggest you try our Sample C++ Institute CLP Certified Professional Programmer Certification Practice Exam. This sample practice exam gives you the feeling of reality and is a clue to the questions asked in the actual CLP - C Certified Professional Programmer certification exam.

These sample questions are simple and basic questions that represent likeness to the real C++ Institute CLP-12-01 exam questions. To assess your readiness and performance with real time scenario based questions, we suggest you prepare with our Premium C++ Institute CLP Certified Professional Programmer Certification Practice Exam. When you solve real time scenario based questions practically, you come across many difficulties that give you an opportunity to improve.

C++ Institute CLP-12-01 Sample Questions:

01. Consider the fragment below on an implementation where long is 64 bits wide.
long n = 9007199254740993L; /* 2^53 + 1 */
printf("%d", (long)(double)n == n);
What is written, and why?
a) 0, because converting a signed integer to a floating type is implementation-defined
b) 1, because the value is well within the range of the floating type
c) 0, because the value needs more significand bits than the floating format provides, so the conversion rounds
d) 1, because a conversion from an integer type to a floating type and back is required to be value-preserving
 
02. Which statements about a connection-oriented stream socket are correct?
(Choose two.)
a) Each call on the sending side produces exactly one call's worth of data on the receiving side
b) A successful send means the peer's application has received the data
c) The transport converts multi-byte numeric fields to a common byte order
d) Either peer may shut down its own direction while continuing to read from the other
e) A single connection is identified by the pair of endpoint addresses, so one listening port can carry many simultaneous connections
 
03. Consider the two declarations below.
int *f(void);
int (*g)(void);
What has been declared?
a) f is a function returning a pointer to int; g is a pointer to a function returning int
b) Both declare a function returning a pointer to int; the parentheses in the second only group the return type
c) f is a pointer to a function returning int; g is a function returning a pointer to int
d) Both declare a pointer to a function returning int; the parentheses in the second are redundant
 
04. Which statements about C11 features are correct, taking C11 as the reference revision?
(Choose two.)
a) C11 replaced the C99 revision, so a C99 construct is no longer valid in a C11 program
b) An implementation may omit variable-length arrays and report that by defining __STDC_NO_VLA__
c) _Generic evaluates only the selected association, so the unselected associations need not even be valid for the operand
d) _Noreturn tells the translator that control never returns from the function, which it may use for diagnostics and optimisation
e) _Alignof yields the number of bytes an object of the given type occupies
f) _Static_assert is checked when the program runs, so a failing assertion aborts execution
 
05. A design uses setjmp and longjmp to abandon a deep parse on the first syntax error, returning directly to the top-level driver. The parser allocates working buffers at several levels of recursion. What is the principal risk this design introduces that a goto-based unwind would not?
a) The jump cannot cross a translation-unit boundary, so the driver and the parser must be in one file
b) The jump skips every intervening frame without running any release code, so each level's buffers are leaked
c) The jump is limited to one frame, so a deep parse cannot reach the driver in a single call
d) The jump restores the destination frame's registers, so any object the compiler had placed in one is rolled back to its value at the setjmp
 
06. One module of a program writes with open, write and close; another writes the same kind of data with fopen, fwrite and fclose. Which statement correctly places these two families of calls?
a) The first is the ABI and the second is the API, so the two describe the same operations at different layers
b) The first is the POSIX system-call interface over descriptors; the second is the C standard library's buffered stream interface, and on a POSIX system it is normally implemented on top of the first
c) Both are specified by the C standard; the first is the low-level form and the second the convenience wrapper, so both are available on every hosted implementation
d) Both are specified by POSIX; the C standard defers all input and output to the host operating system
 
07. A supervisor process opens a log file, then forks and executes a child that must not inherit that descriptor. It must also redirect the child's standard output to the same file. Which calls achieve those two requirements?
(Choose two.)
a) fcntl(logfd, F_SETFD, FD_CLOEXEC) to stop the log descriptor being inherited
b) fcntl(logfd, F_SETFL, FD_CLOEXEC), since either fcntl command can carry the flag
c) dup2(logfd, STDOUT_FILENO) before the exec, which closes the old standard output first if it is open
d) close(logfd) in the supervisor immediately after the fork, which prevents the child from inheriting it
e) dup(logfd) before the exec, since the duplicate becomes the child's standard output
 
08. Two processes append records to one shared log file. One developer proposes seeking to the end and then writing; another proposes opening the file with O_APPEND and writing.
/* A */ lseek(fd, 0, SEEK_END); write(fd, rec, len);
/* B */ /* fd opened with O_APPEND */ write(fd, rec, len);
Which analysis is correct?
a) Both are equivalent, because the file offset is a property of the descriptor and cannot be affected by another process
b) B has the same window as A, because O_APPEND merely performs the seek automatically before the write
c) A is correct and B is not, because O_APPEND ignores the file offset and always writes at the beginning
d) A has a window between the seek and the write; B performs both as one operation
 
09. A parser walks a comma-separated buffer using strtok. Which statements about that choice are correct?
(Choose two.)
a) It returns a pointer to freshly allocated storage that the caller must free
b) It returns an empty token for each pair of adjacent separators
c) It modifies the buffer it is given, writing terminators over the separators
d) It is safe to call from several threads at once, provided each thread has its own buffer
e) It holds the position between calls in state that is not supplied by the caller, so two interleaved traversals interfere
 
10. A settlement calculation must carry roughly fifty significant decimal digits and must round every intermediate result in a documented, reproducible way across platforms. The team has confirmed that long double is not wide enough.
What does moving to an external multiple-precision library provide that the built-in types cannot?
a) Automatic conversion of existing double expressions, so the calculation needs no source changes
b) Hardware acceleration of wide arithmetic, which is what makes the extra precision affordable
c) A precision chosen at run time, and a rounding rule the library applies to every operation
d) Exact arithmetic on any value expressible as a ratio of integers, so decimal fractions round-trip without error

Answers:

Question: 01
Answer: c
Question: 02
Answer: d, e
Question: 03
Answer: a
Question: 04
Answer: b, d
Question: 05
Answer: b
Question: 06
Answer: b
Question: 07
Answer: a, c
Question: 08
Answer: d
Question: 09
Answer: c, e
Question: 10
Answer: c

Note: For any error in CLP - C Certified Professional Programmer (CLP-12-01) certification exam sample questions, please update us by writing an email on feedback@edusum.com.

Rating: 5 / 5 (115 votes)