Welcome to Your Quiz: Aptitude Test C Programming for Students

Name Email
1. A C variable name can start with a ____
2. What does the following declaration mean?
int (*ptr)[10];
3. A preprocessor directive is a message from programmer to the preprocessor.
4. Which one is not a reserved keyword in C Language?
5. What do the following declaration signify ?
void (*cmp)();
6. Which of the following statements correctly declare a function that receives a pointer to pointer to a pointer to a float and returns a pointer to a pointer to a pointer to a pointer to a float?
7. A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?
8. Which header file should be included to use functions like malloc() and calloc()?
9. What will be the output of the program ?
#include<stdio.h>
int main()
{
enum status { pass, fail, atkt};
enum status stud1, stud2, stud3;
stud1 = pass;
stud2 = atkt;
stud3 = fail;
printf("%d, %d, %d\n", stud1, stud2, stud3);
return 0;
}
10. In mathematics and computer programming, which is the correct order of mathematical operators
11. Prototype of a function means _____
12. What will be the output of the program in 16-bit platform (under DOS)?
#include<stdio.h>
int main()
{
struct node
{
int data;
struct node *link;
};
struct node *p, *q;
p = (struct node *) malloc(sizeof(struct node));
q = (struct node *) malloc(sizeof(struct node));
printf("%d, %d\n", sizeof(p), sizeof(q));
return 0;
}
13. What will be the output of the program ?
#include <stdio.h>
char *str = "char *str = %c%s%c; main(){ printf(str, 34, str, 34);}";
int main()
{
printf(str, 34, str, 34);
return 0;
}
14. Input/output function prototypes and macros are defined in which header file?
15. Which of the following statements are correct about the program?
#include <stdio.h>
int main()
{
unsigned int num;
int i;
scanf("%u", &num);
for(i=0; i<16; i++)
{
printf("%d", (num<<i & 1<<15)?1:0);
}
return 0;
}
It prints all even bits from num
16. Point out the error in the following program.
#include <stdio.h>
#include <stdlib.h>
int main()
{
static char *p = (char *)malloc(10);
return 0;
}
17. The way the break is used to take control out of switch and continue to take control of the beginning of the switch?
18. Will the expression *p = p be disallowed by the compiler?
19. Left shifting an unsigned int or char by 1 is always equivalent to multiplying it by 2.
20. Name the loop that executes at least once.

Thank You for Submitting your response for Quiz

Aptitude Test C Programming for Students

Please click on View Result Button to see the Result.



(Visited 24 times, 1 visits today)