Questions

Q:

Which interrupts is not level-sensitive in 8085?

Answer

TST 7.5 is a raising edge-triggering interrupt.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

2 4101
Q:

I have four fingers and a thumb, but not alive.

Who am I?

Answer

A glove. It has 5 fingers as we have but not alive.

Report Error

View answer Workspace Report Error Discuss

Subject: Logic Puzzles Exam Prep: GATE , CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

2 4101
Q:

Write a c program to find out sum of diagonal element of a matrix.

Answer

#include<stdio.h>

int main(){

  int a[10][10],i,j,sum=0,m,n;

  printf("\nEnter the row and column of matrix: ");
  scanf("%d %d",&m,&n);

  printf("\nEnter the elements of matrix: ");
  for(i=0;i<m;i++)
      for(j=0;j<n;j++)
           scanf("%d",&a[i][j]);
  printf("\nThe matrix is\n");

  for(i=0;i<m;i++){
      printf("\n");
      for(j=0;j<m;j++){
      printf("%d\t",a[i][j]);
      }
 }
 for(i=0;i<m;i++){
     for(j=0;j<n;j++){
          if(i==j)
              sum=sum+a[i][j];
     }
 }
 printf("\n\nSum of the diagonal elements of a matrix is: %d",sum);

 return 0;
}

Sample output:

Enter the row and column of matrix: 3 3
Enter the elements of matrix:
2
3
5
6
7
9
2
6
7
The matrix is
2       3       5
6       7       9
2       6       7
Sum of the diagonal elements of a matrix is: 16

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 4101
Q:

Answer the Following Puzzle.

Number_Puzzles_Typical_Aptitude_Questions_and_Answers1585548407.png image

A) 1111 B) 4311
C) 1143 D) 4343
 
Answer & Explanation Answer: C) 1143

Explanation:

Starting with the top 3 digit number, the first digit increases by 2 as you descend,from 1 to 11. The middle digit decreases by 1 each time,and the right hand digit alternates between 5 and 3

Report Error

View Answer Report Error Discuss

Filed Under: Number Puzzles
Exam Prep: CAT , Bank Exams

13 4100
Q:

Math Logic Challenge

18582095_1309614185812349_1823149961450714717_n1499156071.jpg image

A) 23 B) 26
C) 13 D) 29
 
Answer & Explanation Answer: B) 26

Explanation:

Let the integer be x. Then,

 x2-20x = 156

 

(x + 6)(x - 26) = 0

 

x = 26

 

The integer is 26.

Report Error

View Answer Report Error Discuss

Filed Under: Math Puzzles
Exam Prep: GATE , CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk

12 4100
Q:

Atomic weight of an element is given by

A) sum of neutrons and electrons B) sum of neutrons and protons
C) only neutrons D) only protons
 
Answer & Explanation Answer: A) sum of neutrons and electrons

Explanation:

Atomic weight=number of neutrons+number of protons

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

7 4100
Q:

How would you use qsort() function to sort an array of structures?

Answer

#include "string.h"


#include "stdlib.h"


struct stud


{


       int rollno;


       int marks;


       char name[30];


};


int sort_m (struct stud *, struct stud *);


int sort_name (struct stud *, struct stud *);


int sort_marks (struct stud *, struct stud *);


 


main()


{


static struct stud ss[] = {


                                            { 15, 96, "Akshay" },


                                            { 2, 97, "Madhuri" },


                                            { 8, 85, "Aishvarya" },


                                            { 10, 80, "Sushmita" }


                                   };


int x,w;


clrscr();


w = sizeof (struct stud);


 


printf ('\nIn order of roll numbers:");


qsort (ss, 4, w, sort_rn);


for(x=0; x<4;x++)


     printf ("\n%d%s%d", ss[x].rollno, ss[x].name,ss[x].marks);


 


printf("\n\nIn order of names:");


qsort(ss, 4, sort_name);


 


for (x=0; x<4;x++)


      printf("\n%d%s%d",ss[x].rollno, ss[x].name,ss[x].marks);


printf("\n\nIn order of marks:");


qsort(ss,4,w,sort_marks);


 


for (x=0;x<4;x++)


      printf ("\n%d%s%d",ss[x].rollno,ss[x].name,ss[x].marks);


}


int sort_rn (struct stud *t1, struct stud *t2)


{


     return (t1->rollno-t2->rollno);


}


 


int sort_name (struct stud *t1, struct stud *t2)


{


     return (strcmp(t1->name,t2->name));


}


int sort_marks (struct stud *t1, struct stud *t2)


{


     return (t2->marks-t1->marks);


}


 


 


 

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 4098
Q:

The main use of salt in the diet is to

the_main_use_of_salt_in_the_diet_is_to1552126680.jpg image

A) produce in small amounts the hydrochloric acid required for the digestion of food B) increase the solubility of food particles in water
C) make the taste of food better D) ease the process of cooking
 
Answer & Explanation Answer: A) produce in small amounts the hydrochloric acid required for the digestion of food

Explanation:

The main use of salt in the diet is to produce in small amounts the hydrochloric acid required for the digestion of food.

Report Error

View Answer Report Error Discuss

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

2 4097