Program to print 0 to 9 in cross order
Answers were Sorted based on User's Feedback
Answer / james
#include<iostream.h>
int main()
{
for(int i=0;i<=9;i++)
{
for (int j = 0; j <=i; j++)
cout << " ";
cout << i << endl;
}
}
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / aakash dang
#include<iostream.h>
#include<conio.h>
void main()
{
int x,y;
x=1,y=1;
for(int i=0;i<=9;i++)
{
cout<<i;
gotoxy(x,y);
x++;
y++;
}
getch();
}
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kalyan chukka
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,j;
clrscr();
for(i=0;i<=9;i++)
{
for(j=1;j<=i;j++)
{
printf(" ");
}
printf("%d\n ",i);
}
getch();
}
Check in windows Environment
Is This Answer Correct ? | 0 Yes | 4 No |
Why do we need oop?
Explain the concepts involved in Object Oriented programming.
Write a program to reverse a string using recursive function?
What is constructor in oop?
explain defference between structure and class with example
What are the important components of cohesion?
what type of question are asked in thoughtworks pair programming round ?
What is persistence in oop?
why the memory allocated with new cant be freed using free()
what is the use of mutable key word
what is virtual destructor
where is memory for struct allocated? where is memory for class-object allocated? I replied for struct in stack and for class-object in heap. THen he asked if class has struct member variable what happens.class on heap and what about struct in that class? couldnt ans :( :-?