Advertisement
oriondawiz

Untitled

Mar 22nd, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. #include<string.h>
  4.  
  5. int main()
  6. {
  7.     int i,j,n,m=1;
  8.     char str[100][100];
  9.  
  10.     printf("Enter no of string: \n");
  11.     scanf("%d", &n);
  12.  
  13.     for(i=1; i<n; i++)
  14.     {
  15.         printf("str %d \n",m);
  16.         m++;
  17.         gets(str[i]);
  18.     }
  19.  
  20.     for(i=0; i<n; i++){
  21.         for(j=0; j<1; j++){
  22.             if(str[i][j] == '/' && str[i][j+1] == '/'){
  23.                 printf("String %d Single Line Comment.\n", i+1);
  24.             }else if(str[i][j] == '/' && str[i][j+1] == '*'){
  25.                 printf("Multi Line Comment\n");
  26.             }else{
  27.                 printf("Normal String\n");
  28.             }
  29.         }
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement