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

‘World Sustainable Development Summit’ is organized by which institution?

 

 

A) The Energy and Resources Institute B) World Economic Forum
C) NITI Aayog D) UNDP
 
Answer & Explanation Answer: A) The Energy and Resources Institute

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

1 3747
Q:

Answer the following puzzle

Answer

To the 6


Explanation:


Starting with the top left clockface and working clockwise around the others, the sum of the numbers pointed to by the 2 hands starts at 3 and increases by 2 each time.

Report Error

View answer Workspace Report Error Discuss

Subject: Clock puzzles

13 3747
Q:

The command to eliminate a table from a database is

A) REMOVE TABLE CUSTOMER; B) UPDATE TABLE CUSTOMER;
C) DELETE TABLE CUSTOMER; D) DROP TABLE CUSTOMER;
 
Answer & Explanation Answer: D) DROP TABLE CUSTOMER;

Explanation:

The SQL DROP TABLE statement is used to remove a table definition and all data, indexes,...

Report Error

View Answer Report Error Discuss

4 3744
Q:

24 Famous Football Cups and Trophies List With Pictures

Answer

List of International Football Trophies


 


1. UEFA Champions League - International


UEFA_Champions_League1560151581.jpg image



2. FIFA World Cup Trophy - International


FIFA_World_Cup1560151610.jpg image



3. League Championship Trophy - International


League_Championship_Trophy1560151646.jpg image



4. Premier League Trophy - International


 


List of Famous Indian Trophies Associated With Football


 


1. Bandodkar Trophy - India


Bandodkar_cup1560151768.jpg image



2. Dr. BC Roy Trophy - India


B.C_._Roy_Trophy_1560151831.jpg image



3. DCM Trophy - India


DCM_Trophy1560151849.png image



4. IFA Shield - India


IFA_Shield1560151872.png image



5. Santosh Trophy - India


Santosh_Trophy1560151912.jpg imageSantosh_Trophy1560151925.png image



6. Sir Ashutosh Mukherjee Trophy - India



7. Todd Memorial Trophy - India



8. Vittal Trophy - India


 


Trophies Associated With Football in US


 


1. BCS Trophy - America


BCS_Trophy1560152152.jpg image


2. Heisman Trophy - US


Heisman_Trophy1560152172.jpg image


 


Football Trophies in Australia



1. McClelland Trophy - Australia


McClelland_Trophy1560152235.jpg image


 


International Football Cups List


 


1. Colombo Cup - International


Colombo_Cup1560157663.jpg image



2. Confederation Cup - International


Confederation_Cup1560157729.jpg image



3. European Champion Clubs’ Cup - International


European_Champion_Clubs’_Cup1560157829.jpg image


4. The Scottish Cup - International


 


Famous Football Cups List in India


1. Durand Cup - India


Durand_Cup1560157914.jpg image


2. Kalinga Cup - India


Kalinga_Cup1560157944.jpg image



3. Rovers Cup - India


Rovers_Cup1560157977.jpg image



4. Scissor Cup - India


5. Subrato Mukherjee Cup - India


 


Football Cup in US and Canada


Grey Cup - US and Canada


Grey_Cup1560158090.jpg image


 


Football Cup in Asia


Meredka Cup - Asia


Meredka_Cup1560158121.jpg image

Report Error

View answer Workspace Report Error Discuss

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

12 3744
Q:

It is 3 in the morning, you’re sleeping and you hear the doorbell. It’s your parents who show up for a surprise visit for breakfast. You’ve got the strawberry jam, honey, bread and cheese.
What do you open first?

A) open your door B) open your mouth
C) open the fridge D) open your eyes
 
Answer & Explanation Answer: D) open your eyes

Explanation:

As you were asleep, none of the things could have happened without doing "open your eyes" first.

Report Error

View Answer Report Error Discuss

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

7 3742
Q:

In which core leader competency is the warrior ethos exemplified

Answer

The U.S. Army identifies eight core leadership competencies. One of these--leading by example--exemplifies the warrior ethos. The leader is always required to behave in a way that provides those under his or her command with a positive and effective role model.


 


 In_which_core_leader_competency_is_the_warrior_ethos_exemplified1558508870.jpg image


 


The warrior ethos is a value that is eschewed by the U.S. Army.


The Army defines it as the adherence to a code that includes always putting the mission first, never accepting defeat, never quitting, and never leaving behind a comrade who has fallen.

Report Error

View answer Workspace Report Error Discuss

Subject: World Organisations Exam Prep: Bank Exams
Job Role: Bank Clerk

3 3742
Q:

Antibiotics are mostly obtained from

A) Viruses B) Fungi
C) Bacteria D) Angiosperms
 
Answer & Explanation Answer: B) Fungi

Explanation:
Report Error

View Answer Report Error Discuss

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

8 3741