Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

0 Answers  


How do you list files in a directory?

0 Answers  


main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); }

27 Answers   Advent Global Solutions, CitiGroup, Valeo Lighting Systems India Private Limited, Vishal Transformers, Wipro, Zencer,


pgm to find middle element of linklist(in efficent manner)

4 Answers   Huawei,


Does c have function or method?

0 Answers  






Which is not valid in C? 1) class aClass{public:int x;} 2) /* A comment */ 3) char x=12;

7 Answers  


what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year

7 Answers   TCS,


Write the test cases for checking a variable having value in range -10.0 to +10.0?

0 Answers   Bosch,


1. main() { printf("%d",printf("HelloSoft")); } Output?

3 Answers   HCL,


I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?

3 Answers  


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

0 Answers  


sum of two integers values only other then integer it should print invalid input.

1 Answers  


Categories