Sunday, August 19, 2018

PRINT STRING

  • Problem Description

    C program to print a string using pointer
  • CODING ARENA::
  • #include <stdio.h>
    #include<string.h>
    int main()
    {
      char a[100];
      scanf("%s",a);
      printf("%s",a);

    return 0;
    }
  • Test Case 1

    Input (stdin)
    helloworld
    
    
    Expected Output
    helloworld
  • Test Case 2

    Input (stdin)
    programming
    
    
    Expected Output
    programming

No comments:

Post a Comment