You work as a senior developer at ABC.com. The ABC.com network consists of a single domain
named ABC.com.
You are running a training exercise for junior developers. You are discussing the use of the #elif
directive.
Which of the following is TRUE with regards to the #elif directive?
A.
It can be used without a matching #endif directive.
B.
It must be immediately followed by the #endif directive.
C.
It must be immediately followed by the #if directive.
D.
It must be immediately followed by the #else directive.
Explanation:
Correct answer should be B
Using #elif is simpler, because each #if requires a #endif (C# Reference), whereas a #elif can be used without a matching #endif.
https://msdn.microsoft.com/pl-pl/library/88td0y52.aspx
B is the correct answer.
option A
C, because after #if you can place only #endif or #else or #elif. “immediately followed by the …” means placed after …, so right answer is C.
A & C
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-elif
It’s A.