2
Reply

How many times C# Corner will be printed in the following code?

Sourabh Somani

Sourabh Somani

Jun 05, 2019
561
0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int x;
  5. for(x=-1; x<=10; x++)
  6. {
  7. if(x < 5)
  8. continue;
  9. else
  10. break;
  11. printf("C# Corner");
  12. }
  13. return 0;
  14. }

    output

    C# Corner will not print or zero times it will print

    Sourabh Somani
    June 05, 2019
    1

    using System;
    public class X
    {
    public static void Main()
    {
    int i=0;
    i=i++ + i++;
    i++;
    ++i;
    Console.WriteLine(i);
    }
    }

    Harshit Pandey
    April 05, 2024
    0