6 kyu

C typeof

Description:

You have to implement a typeof unary operation that shall yield the type of its argument as a string.

It should work for the following types :

int
float
double
void*
char*
int*
const int*
void (*) (void)
struct timespec // defined in <time.h>
div_t           // defined in <stdlib.h>

If the argument is of any other type, the result should be "unknown type".

Note : Pay attention to the way your code is run in the sample tests.

Fundamentals

Stats:

CreatedJan 28, 2021
PublishedJan 28, 2021
Warriors Trained379
Total Skips34
Total Code Submissions199
Total Times Completed71
C Completions71
Total Stars9
% of votes with a positive feedback rating93% of 21
Total "Very Satisfied" Votes19
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes1
Total Rank Assessments5
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • trashy_incel Avatar
  • monadius Avatar
Ad