kaldin

  • Login

C Programming


1) Point out the error in the following program.

#include<stdio.h>
int main()
{
    struct emp
    {
        char name[20];
        float sal;
    };
    struct emp e[10];
    int i;
    for(i=0; i<=9; i++)
        scanf("%s %f", e[i].name, &e[i].sal);
    return 0;
}
  • A)

  • B)

  • C)

  • D)

Next
Show Answer:
Show Answer


More Question
Which header file should you include, if you are going to develop a function, which can accept variable number of arguments
va_list is an array that holds information needed by va_arg and va_end.
Will the program compile in Turbo C #includestdio.hint main() int a=10, j; void k; j=k=&a; j++; k++; printf(u u\n, j, k); return 0;
Which of the following statements are correct about an array 1: The array int num[26]; can store 26 elements.2: The expression num[1] designates the very first element in the array.3: It is necessary to initialize the array at the time of declaration.4: The declaration num[SIZE] is allowed if SIZE is a macro.
What will be the output of the program #includestdio.hint main() char str[] = Nagpur; str[0]='K'; printf(s, , str); str = Kanpur; printf(s, str+1); return 0;