PRF

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is the output of this C code? #include <stdio.h> int main() { int p = 10, q = 20, r; if (r = p = 5 || q > 20) printf("%d", r); else printf("No Output\n"); } a) 1 b) 10 c) 20 d) No Output

A

Which of the following cannot be a variable name in C? a) volatile b) true c) friend d) export

A

The format identifier '%i' is also used for _____ data type? a) char b) int c) float d) double

B

What is the output of this C code? #include <stdio.h> int main(){ signed char chr; chr = 128; printf("%d\n", chr); return 0; } a) 128 b) -128 c) Depends on the compiler d) None of the mentioned

B

Which data type is most suitable for storing a number 65000 in a 32-bit system? a) signed short b) unsigned short c) long d) int

B

Variable names beginning with underscore is not encouraged. Why? a) It is not standardized b) To avoid conflicts since assemblers and loaders use such names c) To avoid conflicts since library routines use such names d) To avoid conflicts with environment variables of an operating system

C

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

C

Which of these statements about primary memory is not true? Select one: a. Primary memory is also volatile b. RAM is a primary memory c. Primary memory transfers information at lower speed than hard disks d. Primary memory holds the information accessed by the CPU.

C

#include <stdio.h> 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

D

Variable name resolving (number of significant characters for uniqueness of variable) depends on a) Compiler and linker implementations b) Assemblers and loaders implementations c) C language d) None

D

What is the problem in following variable declaration? float 3Bedroom-Hall-Kitchen?; a) The variable name begins with an integer b) The special character '-' c) The special character '?' d) All of the mentioned

D

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

D


Conjuntos de estudio relacionados

OB: Chapter 15 Postpartum Adaptations

View Set

BIO 111 (General Biology) Chapter 10 (Campbell; Mastering Biology)

View Set

Which of the following statements about viruses is false?

View Set

Pharmacology EDAPT - Steroidal Antiinflammatory Drugs

View Set

Appendicular Muscles - Upper Limb (chapter 11)

View Set

AP Caculus AB Free Response: Particle Motion

View Set

Sentence Structure, Simple and Compound Sentences

View Set

Intro to Business Chapter 6, Introduction to Business | Chapter 6

View Set

Human Anatomy and Physiology- Sections 10.8-10.10

View Set