Find the first capital letter in a string using recursion

Given a string, find the first capital letter in the string using recursion



C Implementation:

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

char findcapital(char *s)

{

  if((*s>='A' && *s<='Z')|| *s=='\0')

  return *s;

  findcapital(++s);

}

int main(void) {

  char *s;

  char c;

  s=(char*)malloc(sizeof(char));

  scanf("%s",s);

  c=findcapital(s);

  if(c)

  printf("First capital letter in %s is %c",s,c);

  else

  printf("No capital letters in %s",s);

  return 0;

}