top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Write a loop statement that will show the following output: 1

+2 votes
724 views
Write a loop statement that will show the following output: 1
posted Nov 15, 2018 by Sanjay Kumar Sahu

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
for(printf("1\n");0;);
answer Nov 21, 2018 by Chirag Gangdev
0 votes

Try the following code in C

for (i=0; i<1; i++) 
{
  printf("%d", i);
}
answer Nov 15, 2018 by Salil Agrawal
Right
Similar Questions
+2 votes
for (a=1; a&lt;=100; a++)

printf (&quot;%d\n&quot;, a * a);
+1 vote
1*8+1= 9
12*8+2=98
123*8+3=987
1234*8+4=9876
12345*8+5=98765
123456*8+6=987654
1234567*8+7=9876543
12345678*8+8=9876543 2
123456789*8+9=987654 321
+2 votes
struct marks {
  int a:1;
  int b:2;
};

int main() {
  struct marks obj={1,6};
  printf("%d %d\n",obj.b,obj.a);
}
...