#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main() 
{
    char a;
    char b[30];
    char c[30];
    
    scanf("%c",&a);
    scanf("%s",b);
    scanf(" %[^\n]%*f",c);
    
    /*Essentially this is two reads using scanf. The first part "%[^\n]     
    " means 'read everything that is not a newline' and this is            
    assigned to the character buffer str.

     The second part "%*c" means 'read the next character but don't         
     save it anywhere'; this gets rid of the newline that we didn't         
     read in the first part.*/
    
    printf("%c\n",a);
    printf("%s\n",b);
    printf("%s",c);
      
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: