a simple c program using 'for' loop to display the output

5

4

3

2

1

Answer Posted / rohit dilip kakade

#include<stdio.h>
#include<conio.h>
void main(void)
{
   int i;
clrscr();
    for(i=5;i>0;i--)
{
      printf("
%d",i);
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure in c definition?

571


Explain the difference between exit() and _exit() function?

632


What is difference between far and near pointers?

606


Are the variables argc and argv are local to main?

787


What is the purpose of macro in C language?

659






What is the difference between NULL and NUL?

724


What are enumerated types?

652


What is a memory leak? How to avoid it?

571


Differentiate between a structure and a union.

758


What is the difference between text and binary modes?

641


Is c object oriented?

537


You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2711


What are the storage classes in C?

620


Explain the use of keyword 'register' with respect to variables.

588


What is assignment operator?

621