Questions

Q:

In 8085 which is called as High order / Low order Rigister?

Answer

Flag is called as Low order rigister & Accumulator is called as High order Rigister.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

1 2721
Q:

Write a c program for quick sort.

Answer

#include<stdio.h>

void quicksort(int [10],int,int);

int main(){
  int x[20],size,i;

  printf("Enter size of the array: ");
  scanf("%d",&size);

  printf("Enter %d elements: ",size);
  for(i=0;i<size;i++)
    scanf("%d",&x[i]);

  quicksort(x,0,size-1);

  printf("Sorted elements: ");
  for(i=0;i<size;i++)
    printf(" %d",x[i]);

  return 0;
}

void quicksort(int x[10],int first,int last){
    int pivot,j,temp,i;

     if(first<last){
         pivot=first;
         i=first;
         j=last;

         while(i<j){
             while(x[i]<=x[pivot]&&i<last)
                 i++;
             while(x[j]>x[pivot])
                 j--;
             if(i<j){
                 temp=x[i];
                  x[i]=x[j];
                  x[j]=temp;
             }
         }

         temp=x[pivot];
         x[pivot]=x[j];
         x[j]=temp;
         quicksort(x,first,j-1);
         quicksort(x,j+1,last);

    }
}

Output:
Enter size of the array: 5
Enter 5 elements: 3 8 0 1 2
Sorted elements: 0 1 2 3 8

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2721
Q:

Which of the following is an interjection?

A) Alas B) Yikes
C) Oh D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO

1 2720
Q:

Which of the following Articles of Indian Constitution guarantees freedom to press?

A) Article 16 B) Article 19
C) Article 22 D) Article 31
 
Answer & Explanation Answer: B) Article 19

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

1 2720
Q:

Who is the first Chief Election Commissioner of India?

A) Kalyan Sundaram B) Sukumar Sen
C) V.S. Ramadevi D) T.N. Seshan
 
Answer & Explanation Answer: B) Sukumar Sen

Explanation:

Sukumar Sen, a civil servant who served as the first Chief Election Commissioner of India from 21 March 1950 to 19 December 1958.

 

Who_is_the_first_Chief_Election_Commissioner_of_India1557483367.jpg image

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2719
Q:

Which of these is a starting point for primary succession?

A) a neglected yard B) a surface exposed by a retreating glacier
C) an abandoned city D) abandoned farmland
 
Answer & Explanation Answer: B) a surface exposed by a retreating glacier

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

4 2719
Q:

what are the hardware interrupts?

Answer

TRAP, RST7.5, RST6.5, RST5.5, INTR.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2719
Q:

Answer the following Program

#define CHARSIZE 8

#define MASK(y) (1 << y % CHARSIZE)

#define BITSLOT (y) (y / CHARSIZE)

#define SET(x,y) ( x[BITSLOT(y)] = MASK(y) )

#define TEST(x,y) ( x[BITSLOT(y)] & MASK(y) )

#define NUMSLOTS(n) ((n + CHARSIZE - 1) / CHARSIZE)

 

Give the above macros how would you

1. declare an array arr of 50 bits

2. put the 20th bit on

3. test whether the 40th bit is on or off

Answer

1. char arr[NUMSLOTS(50)];


2. SET (arr, 20);


3. if (TEST (arr, 40))

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2718