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

Milk is a 

A) mixture B) element
C) metal D) None of these
 
Answer & Explanation Answer: A) mixture

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

5 4301
Q:

Who was the moving spirit behind the Organization of the Ghadar Party?

A) Lala Hardayal B) V.P Savarkar
C) Mahatma Gandhi D) Netaji Subhas Chandra Bose
 
Answer & Explanation Answer: A) Lala Hardayal

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

2 4300
Q:

Digitized information can be used by computers.

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

Explanation:

TRUE. The computers and electronic devices use digitized information which is easily understood by them.


 


Digitization is the process of converting analog signals or information of any form into a digital format that can be understood by computer systems or electronic devices. The term is used when converting information, like text, images or voices, and sounds, into binary code.

Report Error

View Answer Workspace Report Error Discuss

6 4300
Q:

What makes an election democratic?

A) Elections should be held at regular intervals. B) The candidate preferred by the people should get elected.
C) Every citizen should have one vote ad every vote should have an equal value. D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

In short, Democracy is a government "of the people, by the people, and for the people."

 

Definition :

Democracy "is government by the people in which the supreme power is vested in the people and exercised directly by them or by their elected agents under a free electoral system." 


The conditions of a democratic election are:

 

* Every citizen should have one vote ad every vote should have an equal value.

* Voters choose from the political parties and candidates should be free to contest elections giving the voters a real choice.

* Elections should be held at regular intervals.

* The candidate preferred by the people should get elected.

* Elections should be conducted in free and fair manner where people can choose as they really wish.

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

In isotopes the number of neutrons are

A) same B) different
C) both D) none
 
Answer & Explanation Answer: B) different

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

3 4298
Q:

Which statement describes the acid found in vinegar acetic acid ?

A) It feels slippery B) It reacts with Mg to produce H2
C) It tastes bitter D) It releases OH- in a solution
 
Answer & Explanation Answer: B) It reacts with Mg to produce H2

Explanation:

Acid which is present in vinegar is approximately 5 % of acetic acid. This can be confirmed by testing the vinegar with magnesium which gives out hydrogen as a gas.

Report Error

View Answer Report Error Discuss

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

0 4296
Q:

What is the political party of the president now?

A) BJP B) INC
C) BSP D) NCP
 
Answer & Explanation Answer: A) BJP

Explanation:

Ram Nath Kovind, the present President of India is from BJP, Bharatiya Janata Party.

The president of the Republic India is the head of state of India. He is also the commander-in-chief of Indian Armed Forces. He is indirectly elected by the people through members of both houses of the parliament of India, legislative assemblies of all the states of India, the legislative assembly of the Union

Report Error

View Answer Report Error Discuss

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

1 4296