-3

The code is

#include <stdio.h>

int main() {  
    char star = "*";
      
    printf("This is %c",star);
      
    return 0 ;
}
Chris
  • 26,361
  • 5
  • 21
  • 42

1 Answers1

0

The type of "*" is a char [2] aka char * but you want a char which you write as:

char star = '*';
Allan Wind
  • 23,068
  • 5
  • 28
  • 38