3i Infotech Placement: Sample Questions 1080 - 1082 of 1245

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

Question 1080

Edit

Describe in Detail

Essay▾

Which type of architecture does 8085 have?

Explanation

Define Architecture of 8085
  • It is based on von-Neumann architecture where data and instructions are in the same memory space without any distinction between them.
  • is complex instruction set computer.
  • It is a -bit processor with 8 bit data bus.
  • It has address lines.
  • Maximum operating speed is MHz.

Question 1081

Edit

Describe in Detail

Essay▾

Predict the output or error (s) for the following:

  1. main ()
  2. {
  3.     inta =10, ⚹j;
  4.     void ⚹k;
  5.     j =k =&a;
  6.     j ++;
  7.     k ++;
  8.     printf ( “ %u %u”, j, k);
  9. }

Explanation

  • In the program
Table Showing the Program
int a = 10, ⚹ j;
  • Define the integer variable a = 10 and pointer j
void ⚹ k;
  • Define the void pointer k
j = k = &a;
  • Address of a is stored in j and k
j ++ ;
  • Increment the j value.
k ++ ;
  • Increment the k value
  • But void pointers are generic and are used only when the type is not known and as an intermediate address storage type.
  • No pointer arithmetic can be done on them and program cannot apply indirection operator (⚹) on void pointers.

Question 1082

Edit

Write in Short

Short Answer▾

What is the output of the following program?

  1. main ()
  2. {
  3.     unsignedchari =0;
  4.     for (; i>= 0; i ++ );
  5.     printf ( “%d” i);
  6. }

Explanation

  • Define the unsigned char
  • Unsigned character represents only + ve value from 0 to 255.
Table Shows the Program
unsigned char i = 0;
  • Define the unsigned character variable i = 0
for (; i >= 0; i ++) ;
  • Here char is declared to be unsigned.
  • So the i ++ can never yield negative value and i > 0 never becomes false
printf ( “% d” i) ;
  • So that it can come out of the for loop.

Developed by: