print the table 5 in loops

Answers were Sorted based on User's Feedback



print the table 5 in loops..

Answer / kiran

{
int n = 5;
for(i=1;i<=10;i++)
printf("
%d x %d = %d",n,i,n*i);
}

Is This Answer Correct ?    6 Yes 0 No

print the table 5 in loops..

Answer / tushar patil

#include<stdio.h>
#include<conio.h>
main()
{

int a=5,i;
printf("TABLE OF 5");
printf("

");

for(i=1;i<=10;i++)
{
printf("%d ",i*a);
}

getch();
}

Is This Answer Correct ?    3 Yes 1 No

print the table 5 in loops..

Answer / mazahar

#include<stdio.h>
main()
{
int i,n=5;
for(i=0;i<=10;i++)
printf("%d*%d=%d",n,i,n*i);
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help

5 Answers  


whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.

1 Answers  


How to find the given no is odd or even without checking of any condition and loops. (Hint: Using array)

4 Answers  


What does the error message "DGROUP exceeds 64K" mean?

0 Answers   Celstream,


main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }

22 Answers   NDS, TCS,


Differentiate between a structure and a union.

0 Answers   Zensar,


find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }

10 Answers   Amdocs, TCS,


Which function in C can be used to append a string to another string?

0 Answers  


Explain what is the most efficient way to store flag values?

0 Answers  


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

0 Answers  


Why do we use main function?

0 Answers  


how to write palindrome program?

3 Answers  


Categories