C Programming Test (Random Questions) - Computer Science & Engineering
| Marks : | ||
| Total number of questions | : | |
| Number of answered questions | : | |
| Number of unanswered questions | : | |
Instruction:
| 1. | Which cause a compiler error?
|
||||||||||||||
Your Answer: Option Correct Answer: Option B Explanation: Option B generates a compiler error: <identifier> expected. The compiler thinks you are trying to create two arrays because there are two array initialisers to the right of the equals, whereas your intention was to create one 3 x 3 two-dimensional array. To correct the problem and make option B compile you need to add an extra pair of curly brackets: int [ ] [ ] scores = { {2,7,6}, {9,3,45} }; Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 2. | If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references? |
||||||||||||||
Your Answer: Option Correct Answer: Option E Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 3. | Consider the following program and what will be content of t? |
|||||||||||
Your Answer: Option Correct Answer: Option B Explanation: fp = fopen("DUMMY.C", "w"); A file DUMMY.C is opened in write mode and returns the file pointer to fp t = fileno(fp); returns the handle for the fp stream and it stored in the variable t printf("%d\n", t); It prints the handle number. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 4. | Which one of the following phrases best describes residual magnetism? |
||||||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 5. | Layer 2 switching provides which of the following?
|
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: Switches, unlike bridges, are hardware based. Cisco says its switches are wire speed and provide low latency, and I guess they are low cost compared to their prices in the 1990s. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 6. | Maria needs to install software on a Windows NT Server computer which is a backup domain controller. When she attempts to log on to the server, she receives the message "Unable to log on locally". What must you do to enable Maria to log on to the server? |
||||||||||||||
Your Answer: Option Correct Answer: Option B Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 7. | Which of the following term is used for a function defined inside a class? |
|||||||||||
Your Answer: Option Correct Answer: Option B Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 8. | Suppose the zener diode has a breakdown voltage of 10 V and zener resistance of 8.5 W, what is the additional voltage when the current is 20 mA? |
||||||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 9. | The first step in database development is which of the following? |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 10. | Which of the following are Logical operators in C#.NET? && || ! Xor %
|
||||||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 11. | What will be the output of the program? public class X |
|||||||||||
Your Answer: Option Correct Answer: Option C Explanation: Error is thrown but not recognised line(22) because the only catch attempts to catch an Exception and Exception is not a superclass of Error. Therefore only the code in the finally statement can be run before exiting with a runtime error (Exception in thread "main" java.lang.Error). Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 12. | _____ is the use of a model in an attempt to identify and/or reflect the behaviour of a real person, process, or system. |
||||||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 13. | Some Streams work with input, and some with output |
|||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 14. | Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? |
||||||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 15. | To define what columns should be displayed in an SQL SELECT statement: |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 16. | Digital signals: |
||||||||||||||
Your Answer: Option Correct Answer: Option B Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 17. | Which is not true about surrogate keys? |
|||||||||||
Your Answer: Option Correct Answer: Option C Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 18. | Which of the following statements is correct about the program given below? class Bix |
|||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss.
Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 19. | /* Missing Statement ? */ What line of code should replace the missing statement to make this program compile? |
|||||||||||
Your Answer: Option Correct Answer: Option A Explanation: The usual method for using/importing the java packages/classes is by using an import statement at the top of your code. However it is possible to explicitly import the specific class that you want to use as you use it which is shown in the code above. The disadvantage of this however is that every time you create a new object you will have to use the class path in the case "java.io" then the class name in the long run leading to a lot more typing. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
| 20. | Natural language processing is divided into the two subfields of: |
||||||||||||||
Your Answer: Option Correct Answer: Option D Explanation: No answer description available for this question. Let us discuss. Learn more problems on : C Programming Test (Random Questions) Discuss about this problem : Discuss in Forum |
C Programming Test (Random Questions) - Computer Science & Engineering
