Welcome to Your Quiz: Aptitude Test C Programming Basics Level 1

Name Email
1. Is the following statement a declaration or definition extern int i;
2. Is it true that a function may have several declaration, but only one definition.
3. Which of the following is executed by Preprocess?
4. What should be the output:
void main()
{
int a = 10/3;
printf("%d",a);
}
5. void main()
{
int a = printf ("newtum.com");
printf("%d", a);
}


6. How many main() function we can have in our project?
7. void main()
{
int a = 10.5;
printf("%d",a);
}
8. How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++ < 5-++a)
printf("newtum.com");
}
9. main()
{
int x = 10;
{
int x = 0;
printf("%d",x);
}
}


10. int main()
{
char arr[5]="The newtum.com";
printf("%s",arr);
return 0;
}


11. //This program is compiled on 32 bit DEV-C++
int main()
{
char *ptr1, *ptr2;
printf("%d %d", sizeof(ptr1), sizeof(ptr2));
return 0;
}


12. int main()
{
int _ = 10;
int __ = 20;
int ___ = _ + __;
printf("__%d",___);
return 0;
}


13. Which programming language is more faster among these?
14. int x = 10;
int main()
{
int x = 0;
printf("%d",x);
return 0;
}
15. int main()
{
int a = 320;
char *ptr;
ptr =( char *)&a;
printf("%d",*ptr);
return 0;
}


16. Is it possible to run program without main() function?
17. int main()
{
int x;
x=10,20,30;
printf("%d",x);
return 0;
}


18. Output of the following Program :
int main()
{
extern int i;
i = 20;
printf("%d", sizeof(i));
return 0;
}


19. int main()
{
int a = 5;
int b = 10;
int c = a+b;
printf("%i",c);
}


20. What is sizeof() in C?

Thank You for Submitting your response for Quiz

Aptitude Test C Programming Basics Level 1

Please click on View Result Button to see the Result.



(Visited 508 times, 1 visits today)