Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / mwolo fabrice
#include<stdio.h>
#include<conio.h>
void main()
{
int n=100,i;
scanf("%d",&i);
if(i<n)
{
printf("\n %d\n",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
How can you convert integers to binary or hexadecimal?
Describe the header file and its usage in c programming?
How pointers are declared?
Do you have any idea how to compare array with pointer in c?
Why cant I open a file by its explicit path?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How can you find out how much memory is available?
Do you know the purpose of 'register' keyword?
What is the use of a conditional inclusion statement in C?
praagnovation
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is the use of a semicolon (;) at the end of every program statement?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What's a good way to check for "close enough" floating-point equality?
What is ponter?