Welcome to Your Quiz: C Language Quiz for Beginners Level 1

Name Email
1. What is output of below program?
#include <stdio.h>
int main(int argc, char *argv[]) {
char str1 [] = "newtum" ;
int a = 10;
char str2[12] ;
sprintf (str2, "%s-%d", str1, a) ;
printf ( "%s", str2 ) ; 
return 0;
}
2. How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++ < 5-++a)
printf("newtum.com");
}
3.

Smallest element of array's index is called

4. Which of the following is executed by Preprocess?
5. Find output : 
void main()

    int a = printf ("newtum.com");
    printf("%d", a);
}
6. What should be the output:
void main()
{
    int a = 10.5;
    printf("%d",a);
}
7. What is output of below program?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
    char temp[20];
    gcvt(23.45, 3, temp);
    printf("%s", temp);
    return 0;
}
8. What is output of below program?
#include<stdio.h>
int main()
{
    if(printf("C programming is "))
    {   
        printf("Easy");
    }
    else
    {
        printf("Hard");
    }
    return 0;
}
9. What is output of below program?
#include <stdio.h>
char * f();
char a = 'a';
int main(int argc, char *argv[])
{
char *temp = f();
printf("%%", temp);
return 0;
}
char *f()

return &a;
}
10. How many main() function we can have in our project?
11. Find output : 
main()
{
     int x = 10;
{
  int x = 0;
   printf("%d",x);
}
}
12. Array passed as an argument to a function is interpreted as
13. What should be the output:
void main()

    int a = 10/3;
    printf("%d",a); 
}
14. What is the maximum number of dimensions an array in C may have ?
15. What is output of below program?
#include <stdio.h>
int main()
{
int a = 10;
printf("%d", a);
int a = 20;
printf("%d",a);
return 0;
}
16. What is output of below program?
void main()
{
int i,j,count;
count=0;
for(i=0; i<5; i++);

for(j=0;j<5;j++);
{
    count++;
}
}
printf("%d",count);
}
17. Is it possible to run program without main() function?
18. What is output of below program?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
    char temp[20];
    gcvt(23.45,2, temp);
    printf("%s", temp);
    return 0;
}
19. What is output of below program?
void main()
{
const int a = 10;
printf("%d",++a);
}
20. Array passed as an argument to a function is interpreted as

Thank You for Submitting your response for Quiz

C Language Quiz for Beginners Level 1

Please click on View Result Button to see the Result.



(Visited 345 times, 1 visits today)