Questions

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 4199
Q:

Which of the following is the regulator of the credit rating agencies in india?

A) RBI B) SBI
C) SIDBI D) SEBI
 
Answer & Explanation Answer: D) SEBI

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

4 4199
Q:

...................was conferred Sahitya Akademi Award for his poetry book Khara Zaran

A) Mr. Chinu Modi B) Robin Sharma
C) Gunvant Shah D) Narendra kohli
 
Answer & Explanation Answer: A) Mr. Chinu Modi

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards

3 4198
Q:

Poorly tuned engines do not get good gas mileage.

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The above-given statement is absolutely true. Poorly tuned engines of vehicles will not get good gas mileage.


A poorly running engine may lose power that is needed for normal driving and emergencies, may not start, gets poor fuel economy, pollutes the air, and could stall when you are on the road causing a traffic problem.

Report Error

View Answer Workspace Report Error Discuss

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

2 4197
Q:

A research team of 6 people is to be formed from 10 chemists,5 politicians, 8 economists and 15 biologists.How many teams have atleast 5 chemists?

A) 7350 B) 6400
C) 6379 D) 7266
 
Answer & Explanation Answer: D) 7266

Explanation:

10C5 x 28C1 x 10C6 = 7266

Report Error

View Answer Report Error Discuss

0 4196
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 4196
Q:

The amount of RAM storage is measured in

A) bytes B) mega bytes
C) giga bytes D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

RAM storage capacity is measured in bytes, kilo bytes, mega bytes, giga bytes,...

Report Error

View Answer Report Error Discuss

2 4194
Q:

Chemical name of Gold?

A) Argentinum B) Ferrus
C) Aurum D) Selenium
 
Answer & Explanation Answer: C) Aurum

Explanation:

The Chemical name of Gold is Aurum with symbol Au with atomic number 79 and a group 11 element. In its purest form, it is a bright, slightly reddish yellow, dense, soft, malleable, and ductile metal.

Chemically, gold is a transition metal.

Report Error

View Answer Report Error Discuss

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

0 4194