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()
{
    if(printf("C programming is "))
    {   
        printf("Easy");
    }
    else
    {
        printf("Hard");
    }
    return 0;
}

(Visited 354 times, 1 visits today)
2.

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;
}

(Visited 354 times, 1 visits today)
3.

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;
}

(Visited 354 times, 1 visits today)
4.

What should be the output:
void main()

    int a = 10/3;
    printf("%d",a); 
}

(Visited 354 times, 1 visits today)
5.

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;
}

(Visited 354 times, 1 visits today)
6.

How many main() function we can have in our project?

(Visited 354 times, 1 visits today)
7.

Smallest element of array's index is called

(Visited 354 times, 1 visits today)
8.

Which of the following is executed by Preprocess?

(Visited 354 times, 1 visits today)
9.

What is the maximum number of dimensions an array in C may have ?

(Visited 354 times, 1 visits today)
10.

Array passed as an argument to a function is interpreted as

(Visited 354 times, 1 visits today)
11.

Array passed as an argument to a function is interpreted as

(Visited 354 times, 1 visits today)
12.

Find output : 
main()
{
     int x = 10;
{
  int x = 0;
   printf("%d",x);
}
}

(Visited 354 times, 1 visits today)
13.

What is output of below program?
void main()
{
const int a = 10;
printf("%d",++a);
}

(Visited 354 times, 1 visits today)
14.

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;
}

(Visited 354 times, 1 visits today)
15.

What should be the output:
void main()
{
    int a = 10.5;
    printf("%d",a);
}

(Visited 354 times, 1 visits today)
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);
}

(Visited 354 times, 1 visits today)
17.

Find output : 
void main()

    int a = printf ("newtum.com");
    printf("%d", a);
}

(Visited 354 times, 1 visits today)
18.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++ < 5-++a)
printf("newtum.com");
}

(Visited 354 times, 1 visits today)
19.

Is it possible to run program without main() function?

(Visited 354 times, 1 visits today)
20.

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;
}

(Visited 354 times, 1 visits today)

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 354 times, 1 visits today)
Show Buttons
Hide Buttons