Storage Class in C MCQs Exercise II

Ques 1 Storage Class


What is the output of following Code?
#include<stdio.h>
static char a='a';
int main()
{
    a='c';
    int i;
    for(int i=0;i<6;i++)
  {
    static char a='a';
    printf("%c",a++);
  }
}

A Run time Error
B abcdef
C cdefgh
D aaaaa

Ques 2 Storage Class


What is the output of following Code?
#include<stdio.h>
extern char name[20];
int main()
{
    char name[]="Scode";
    printf("%s",name);
}
char name[20]="Small Code";

A Run time Error
B Error,Multiple Times varible declare
C Small Code
D Scode