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

Rabindranath Tagore was awarded Noble Prize for his literary work named

A) Geetanjali B) Rajtarangini
C) Chokher Bali D) None of these
 
Answer & Explanation Answer: A) Geetanjali

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 4241
Q:

Hormones are chemicals secreted and regulated by the endocrine system.

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

Explanation:

True. Hormones are chemicals secreted and regulated by the endocrine system.

Report Error

View Answer Workspace Report Error Discuss

Subject: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

4 4239
Q:

The Reserve Bank of India has taken some initiatives to prevent a US type sub-prime Crisis in India. Which of the following is/ are such initiatives?

A. Banks are adviced to set up credit counselling centres. 

B. Banks should stop giving housing loans to big borrowers (Asking for loans of  Rs.50 lakhs and above )

C. Banks should not give loans to builders and property dealers/developers

A) Only (A) B) Only (B)
C) Only (C) D) All (A), (B), (C)
 
Answer & Explanation Answer: A) Only (A)

Explanation:
Report Error

View Answer Report Error Discuss

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

0 4238
Q:

Initiating Process Group

What are the Project Management Processes included in the Initiating  Process Group ?

Answer


    • Develop Project Charter

    • Develop Preliminary Project Scope Statement


Report Error

View answer Workspace Report Error Discuss

0 4237
Q:

How many Nephrons are in each kidney?

A) 10,000 B) 1,00,000
C) 1,000,000 D) 1000
 
Answer & Explanation Answer: C) 1,000,000

Explanation:

There are about 1,000,000 nephrons in each human kidney.

Nephron, functional unit of the kidney, the structure that actually produces urine in the process of removing waste and excess substances from the blood.

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk

2 4236
Q:

Name another word for friend?

A) playfellow B) enemy
C) rival D) foe
 
Answer & Explanation Answer: A) playfellow

Explanation:

Friend is a person with whom one has a bond of mutual affection, typically one exclusive of sexual or family relations.

 

Other names for friend are mate, bosom friend, classmate, buddy, ally,...

Report Error

View Answer Report Error Discuss

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

11 4235
Q:

The largest producer of fruits in the Anglo-American Region is _____

A) New - England Region B) Greak Lakes Region
C) California D) Application Region
 
Answer & Explanation Answer: C) California

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

0 4235