Data Types C Questions And Answers
Here you can find Data Types C Questions and Answers.
Why Data Types C Questions and Answers Required?
In this Data Types C Questions and Answers section you can learn and practice Data Types C Questions and Answers to improve your skills in order to face technical inerview conducted by Banks. By
Practicing these interview questions, you can easily crack any Bank Exams interview.
Where can I get Data Types C Questions and Answers?
AllIndiaExams provides you lots Data Types C Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Data Types C
Questions and Answers as PDF files and eBooks.
How to solve these Data Types C Questions and Answers?
You no need to worry, we have given lots of Data Types C Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Bank Exams interview.
Data Types C Questions and Answers
1. Comment on the output of this C code?
int main()
{
int a[5] = {1, 2, 3, 4, 5};
int i;
for (i = 0; i < 5; i++)
if ((char)a[i] == '5')
printf("%d\n", a[i]);
else
printf("FAIL\n");
}
Data Types C Questions and Answers
2. The format identifier ‘%i’ is also used for _____ data type?
Data Types C Questions and Answers
3. Which data type is most suitable for storing a number 65000 in a 32-bit system?
Data Types C Questions and Answers
4. Which of the following is a User-defined data type?
Data Types C Questions and Answers
5. What is the size of an int data type?
Data Types C Questions and Answers
6. What is the output of this C code?
int main()
{
char chr;
chr = 128;
printf("%d\n", chr);
return 0;
}
Data Types C Questions and Answers
7. Comment on the output of this C code?
int main()
{
char c;
int i = 0;
FILE *file;
file = fopen("test.txt", "w+");
fprintf(file, "%c", 'a');
fprintf(file, "%c", -1);
fprintf(file, "%c", 'b');
fclose(file);
file = fopen("test.txt", "r");
while ((c = fgetc(file)) != -1)
printf("%c", c);
return 0;
}
Data Types C Questions and Answers
8. What is short int in C programming?
Data Types C Questions and Answers
9. Comment on the output of this C code?
int main()
{
float f1 = 0.1;
if (f1 == 0.1)
printf("equal\n");
else
printf("not equal\n");
}
Data Types C Questions and Answers
10. Comment on the output of this C code?
int main()
{
float f1 = 0.1;
if (f1 == 0.1f)
printf("equal\n");
else
printf("not equal\n");
}