#include <stdio.h>
int main(){
    int k=0;
    char q1[0],q2[0],q3[0],q4[0],q5[0],q6[0],q7[0],q8[0],q9[0],q10[0],q11[0];
    char a[0]={"b"},b[0]={"a"},c[0]={"d"},d[0]={"c"},e[0]={"d"},f[0]={"c"},g[0]={"b"},h[0]={"d"},i[0]={"c"},j[0]={"a"};
    printf("               MCQS TEST PAPER \n \n \n Total ten question each of 1 Marks \n \n \n1.What is your country name? \na)India  \n b)Pakistan  \nc)Srilanka  \nd)America \nEnter your correct option : ");
    scanf("%s" , &q1);
   printf("\n \n2. What is your province name? \na)Sindh \nb)Punjab \nc)KPK \nd)Balochistan \nEnter your correct option :");
    scanf("%s" , &q2);
   printf("\n \n3. What is your city name?\n a)Lahore \nb)Quetta \nc)Sukkar \nd)Karachi \nEnter your correct option : ");
    scanf("%s" , &q3);
    printf("\n \n4. What is your neighbour country name? \na)Japan \nb)Malaysia \nc)China \nd)Germany \nEnter your correct option :");
    scanf("%s" , &q4);
    printf("\n \n5. What is your national language? \na)Urdu \nb)English \nc)German \nd)Spanish \nEnter your correct option :");
    scanf("%s" , &q5);
    printf(" \n \n6. What is the independence day of Pakistan? \na)15 August \nb)6 September \nc)14 August \nd)3 Feburary \nEnter your correct option :");
    scanf("%s" , &q6);
    printf(" \n \n7. In which year Pakistan came into being? \na)1965 \nb)1947 \nc)2005 \nd)1945 \nEnter your correct option :");
    scanf("%s" , &q7);
    printf(" \n \n8. In which continent Pakistan is situated? \na)Europe \nb)Africa \nc)Australia \nd)Asia \nEnter your correct option :");
    scanf("%s" , &q8);
    printf("\n \n9. Total area of Pakistan? \na)732,095 sq.km \nb)895,095 sq.km \nc)795,095 sq.km \nd)732,098 sq.km \nEnter your correct option : ");
    scanf("%s" , &q9);
    printf(" \n \n10. What is Pakistan national game? \na)Hockey \nb)Cricket \nc)Football \nd)Tennis \nEnter your correct option :");
    scanf("%s" , &q10);

    if(strcmp(a,q1)==0){
    int k+1 ;
    }
    if(strcmp(b,q2)==0){
     int   k+1 ;
    }
    if(strcmp(c,q3)==0){
    int k+1 ;
    }
      printf("%d",k);
      printf("Your total correct answers are %d", k);
    getch();
}

char q1[0] This makes no sense. Why is it this? it should be char q1 Same for the others.

char a[0]={"b"} This makes no sense. Why is it this? It should bechar a='b'. Same for the others.

int k+1 ; This is just completely wrong. It doesn't make any sense at all.

Edited 1 Year Ago by Moschops

This question has already been answered. Start a new discussion instead.