All India Exams
  • Sign In / Register Sign In
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

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

Home EngineeringComputer Science & EngineeringC Multiple Choice Questions & AnswersData Types

Data Types - C Multiple Choice Questions and Answers

This is the c programming questions and answers section on " Data Types " with explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand. Applicants can practice the Data Types C Questions and Answers from the below sections of this post. Here we have provided the multiple choice questions related to the Data Types with answers along with the explanation. Students can check the basic to the advanced Data Types Questions in the below Data Types C Quiz. So, the contenders can scroll down this page to practice the Data Types C Online Test. Aspirants need to move to the below portions of this post and learn the objective questions reharding Data Types in C. In addition to this, the candidates can get the various type of Data Types C Questions and Answers from the below MCQ Quiz.



Data Types C Questions - Data Types C Quiz Details

Online Test Name Data Types
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 15


Each variable in C has an associated a Data Type. Each data type requires the different amounts of memory and has some specific operations which can be performed over it. The Data Types present in the C Language are char, int, float, double. The different data types also have different ranges upto which they can store numbers. These ranges may change from compiler to compiler. The provided is the basic idea related to the Data Types in C. Thus, by learning the concept of the Data Types the aspirants can easily answer the Data Types C Questions in the examination.



Data Types C Multiple Choice Questions

By covering all the types of the Data Types C Questions we have provided the online test. So, all the applicants can check the Data Types C Online Test and learn the questions. in the above table, we have gathered and arranged the information about the Data Types C Quiz. The competitors need to refer to the above table and know the particulars of the Data Types C Mock Test. Contenders can check a lot of Data Types C Multiple Choice Questions from this article. Hence, the students can learn all the concepts of the Data Types by practicing the online tests.

Data Types MCQ Quiz Answers with Solutions

The explanation for the Data Types C Questions are arranged in this post. Along with the right choice, the students can also check the description to the questions. In addition to this, the contenders can use the View Answer button to check the right option among the given alternatives. On our home portal we have provided many more quizzes related to the Computer Science Engineering and many more. Hence, the postulates can visit our homepage to check all the quizzes and learn the questions.


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");
}
  • A. The compiler will flag an error
  • B. Program will compile and print the output 5
  • C. Program will compile and print the ASCII value of 5
  • D. Program will compile and print FAIL for 5 times
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

The ASCII value of 5 is 53, the char type-casted integral value 5 is 5 only.
Output:
$ cc pgm1.c
$ a.out
FAILED
FAILED
FAILED
FAILED
FAILED

Workspace

Report Error


2. The format identifier ā€˜%i’ is also used for _____ data type?
  • A. char
  • B. int
  • C. float
  • D. double
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option B

Explanation:

Both %d and %i can be used as a format identifier for int data type.

Workspace

Report Error


3. Which data type is most suitable for storing a number 65000 in a 32-bit system?
  • A. short
  • B. int
  • C. long
  • D. double
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

65000 comes in the range of short (16-bit) which occupies the least memory.

Workspace

Report Error


4. Which of the following is a User-defined data type?
  • A. typedef int Boolean;
  • B. typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
  • C. struct {char name[10], int age};
  • D. All of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

typedef and struct are used to define user-defined data types.

Workspace

Report Error


5. What is the size of an int data type?
  • A. 4 Bytes
  • B. 8 Bytes
  • C. Depends on the system/compiler
  • D. Cannot be determined.
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

The size of the data types depend on the system.

Workspace

Report Error


  • «
  • 1
  • 2
  • 3
  • »

Related Topics:

  • Preprocessor
  • Standard Input and Output
  • Variable Names
  • Constants
  • C Functions
  • Control Flow Statements
  • Declarations
  • Typedef
  • C Data Types
  • Structures, Unions, Bit-fields

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • LIC Mock Test Series

  • MAT Mock Test

  • SEBI Mock Test

  • ESIC Mock Test

  • IT Courses Quiz

Newsletter

Contact Us

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning Questions
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation Questions
  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions
  • AMCAT Mock Online Test
  • LIC Mock Test
  • IBPS Mock Test

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics
  • iOS Interview Questions
  • Web Technologies
  • Database Interview Questions
  • MS Office Interview Questions
  • Software Tools
  • Data Interpretation
  • PHP Interview Questions
  • CAT Mock Test
  • SSC Mock Test
© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy