Languages [3i Infotech Placement]: Sample Questions 265 - 267 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 265

Languages
Edit

Write in Short

Short Answer▾

What is the layout for toolbar?

Explanation

  • Toolbar provides users with common used features of application.
  • Placed directly below the menu bars at the top of a frame.
  • Acts as a container for other components including button, combo box and menu.
  • A menu is a group of commands located in a menu bar- has buttons providing common commands in the application.

Question 266

Edit

Describe in Detail

Essay▾

Write a program which uses command line arguments.

Explanation

  1. #include<stdio.h>
  2. voidmain(intargc, char ⚹argv[])
  3. {
  4.     inti, sum =0;
  5.     if (argc !=3)
  6.     {
  7.         printf("You have forgot to type numbers.");
  8.         exit(1);
  9.     }
  10.     printf("The sum is :");
  11.     for (i =1; i <argc; i++)
  12.     sum =sum +atoi(argv[i]);
  13.     printf("%d", sum);
  14. }

OUTPUT:

Sum is: 30

Question 267

Edit

Describe in Detail

Essay▾

What is the function of accumulator?

Explanation

Define Us of Accumulator in ALU
  • Accumulator is 8-bit the primary register for ALU.
  • Hold operands for operation which is performed/processed by the ALU.
  • After the successful operation done by the ALU , the accumulator replaces input data by results
  • Result can then be transferred to memory or output device depending on the instruction.
  • Used as temporary storage to perform arithmetic operations.

Developed by: