write a program to display numbers from 1 to 10 and 10 to 1?
Answers were Sorted based on User's Feedback
Answer / sai
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=10;i++)
printf(" %d",i);
printf("\n");
for(i=10;i>=1;i--)
printf(" %d",i);
getch();
}
/* output
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1 */
Is This Answer Correct ? | 6 Yes | 2 No |
Answer / sureshmca
#include<stdio.h>
void main()
{
int num,i;
for(num=0;num<=10;num++)
{
printf("%d",num);
}
}
Is This Answer Correct ? | 3 Yes | 9 No |
write a prgram of swapping with 2 valiables
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
What should be keep precautions while using the recursion method?
how to find anagram without using string functions using only loops in c programming
how can u print a message without using any library function in c
What is variable and explain rules to declare variable in c?
what is the purpose of the code, and is there any problem with it. unsigned int v[10]; unsigned int i = 0; while (i < 10) v[i] = i++;
the format specified for hexa decimal is a.%d b.%o c.%x d.%u
What is the maximum no. of arguments that can be given in a command line in C.?
What are the advantages of using linked list for tree construction?
Is main is a keyword in c?