Languages [3i Infotech Placement]: Sample Questions 459 - 461 of 546

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 459

Languages
Edit

Write in Short

Short Answer▾

What are streams?

Explanation

  • Basically two types of streams in java are input and output streams, and java 8 stream.
Two Types of Streams in Java
  • Used to perform input and output of 8-bit bytes.
  • There are many classes related to byte streams but the most frequently used classes are File Input Stream and File Output Stream.

Question 460

Edit

Describe in Detail

Essay▾
  1. #include<studio.h>
  2. #definea10
  3. main()
  4. {
  5.     #definea50
  6.     printf( “%d” a);
  7. }

Explanation

In a program

Table Shows the Program
#define a 10Define the preprocessor directives a value is 10
main ()

{

#define a 50

Here, define a value also 50.
printf ( “% d” a) ;Print a value is 50

Because, The preprocessor directives can be redefined anywhere in the program

So the most recently assigned value will be taken

Question 461

Edit

Write in Short

Short Answer▾

Which line will be activated when an output device requires attention from CPU?

Explanation

  • Interrupt line is activated when an output device requires attention from CPU.
  • This is why adding a new device to a PC requires IRQ number by setting a DIP switch. This specifies the interrupt line the device will use.
  • IRQ conflicts were a common problem when adding expansion boards, but the plug and play specification removed this problem.

Developed by: