\@6What is the proper extension for a C source code file?.C.txt.exe.comDay 1 "Getting Started with C".C/What is the proper extension of an object file?.o.exe.obj both A and CDay 1 "Getting Started with C" both A and C$What are C language routines called? procedures functionsmodulesnone of the aboveDay 1 "Getting Started with C" functions What kind of function is printf?librarycomplex integrated recursiveDay 1 "Getting Started with C"library=What is the first step in the program development life cycle?compile the source link objectstest executable None of the aboveDay 1 "Getting Started with C"None of the aboveEWhat files are joined together with object files in the link process?source executablelibrarytextDay 1 "Getting Started with C"library:The C compiler requires this character to end a statement: semi coloncolonreturn quoteDay 1 "Getting Started with C" semi colon,What is the compile command for Microsoft C?ccclbcctccDay 1 "Getting Started with C"cl3An unknown function produces an error at what time? compile time link timerun-time both A and BDay 1 "Getting Started with C" link time)What is the C standard used by this text? MicrosoftK & RANSInone of the aboveDay 1 "Getting Started with C"ANSI-Which function is required in all C programs? required ( )main ( ) start ( ) begin ( )&Day 2 "The Components of a C Program"main ( )0What is the standard extension of include files?.Cobj.exe.h&Day 2 "The Components of a C Program".h5What library function displays information on-screen?printfscanffopenfclose&Day 2 "The Components of a C Program"printf/Which of the following are native C data types?intstringcolorshape&Day 2 "The Components of a C Program"int0Which of the following is a legal comment block?/* a comment /* /* a comment**/ a comment ./*none of the above&Day 2 "The Components of a C Program"none of the above$What is a variable name assigned to?functionprogramdata storage locationkey word&Day 2 "The Components of a C Program"data storage location4What are the statements in a function surrounded by?braces semicolonscomments parentheses&Day 2 "The Components of a C Program"braces"How often should comments be used?never infrequently frequentlyonce per source file&Day 2 "The Components of a C Program" frequently2To improve code portability, avoid which of these:nested commentsfunction calls variableskeywords&Day 2 "The Components of a C Program"nested comments-Which of the following are legal syntax in C? /* comment */int a;x=m*n;all of the above&Day 2 "The Components of a C Program"all of the above,Which of the following is not a C data type?shortunsigned floatchar double/Day 3 "Storing Data: Variables and Constants"unsigned float=How many bytes are required to store the phrase "Testing123"?134none of the above/Day 3 "Storing Data: Variables and Constants"none of the above=What is the compiler directive that provides named constants?#define#ifdef#ifndef#include/Day 3 "Storing Data: Variables and Constants"#define2Which of these is not a legal constant definition?#define PI 3.1415const int two dozen = 12const float a_number = 1.234const int a_dozen = 12/Day 3 "Storing Data: Variables and Constants"const int two dozen = 12OWhich of the following is probably a logic error on the part of the programmer? int n=35; unsigned char c=-10;double f=9.18;unsigned int n=52628;/Day 3 "Storing Data: Variables and Constants"unsigned char c=-10;LWhich of the following is a hex constant representing the base 10 number 17?0x170x120x110x21/Day 3 "Storing Data: Variables and Constants"0x115.56E4 =0.000556556005.6025.15/Day 3 "Storing Data: Variables and Constants"5560015 + 1 =0x1016020all of the above/Day 3 "Storing Data: Variables and Constants"all of the above=Which of the following constant definitions for PI are legal?#define PI 3.14159const float pi =3.14159const double pi = 3.14159all of the above/Day 3 "Storing Data: Variables and Constants"all of the above_What is the legal syntax for creating a new type called "character" that is the same as "char"?character = char; typedef char characterchar characternone of the above/Day 3 "Storing Data: Variables and Constants"typedef char character*If x=6, evaluate the expression x + 3 * 47111836/Day 4 "Statements, Expressions, and Operators"18)If x=6, evaluate the expression (x+5) %31234/Day 4 "Statements, Expressions, and Operators"2,Which of these expressions evaluate to true?5 == 5  25 = (5 * 5) (3 / 3) == 1all of the above/Day 4 "Statements, Expressions, and Operators"all of the above\It is good programming practice to use these to specify and clarify precedence of operators:braces brackets  parentheses functions/Day 4 "Statements, Expressions, and Operators" parentheses%If x=6, evaluate the expression x*=44201624/Day 4 "Statements, Expressions, and Operators"24 What does the comma operator do?marks the end of a linebegins a commentends a function6separates variable declarations and function arguments/Day 4 "Statements, Expressions, and Operators"6separates variable declarations and function arguments.Choose the operator with the lower precedence:&&^+~/Day 4 "Statements, Expressions, and Operators"^-Which of these expressions evaluates to TRUE?(6 == 6) ((24/4) == 6)(-1)all of the above/Day 4 "Statements, Expressions, and Operators"all of the aboveEWhat does this expression evaluate to: (0x10 - 16) ? "True":"False"?"True""False"016/Day 4 "Statements, Expressions, and Operators""False"What is the not-equal operator?==+=!=<=/Day 4 "Statements, Expressions, and Operators"!=What is the code that comprises the body of a function called?function argumentsfunction headerfunction definition return valueDay 5 "Functions: The Basics"function definition&How is a structured program organized?randomlyhierarchicallylinearly chaoticallyDay 5 "Functions: The Basics"hierarchically A function's return type can be?intfloatcharany C data typeDay 5 "Functions: The Basics"any C data typeWhat are local variables?'variables defined outside of a function#variables defined inside a function'variables defined in a library functionnone of the aboveDay 5 "Functions: The Basics"#variables defined inside a functionXWhat are the function arguments in the call to this function: int func(int x1, int x2)?x1x2 x1 and x2unknownDay 5 "Functions: The Basics"unknownEWhat is the return value of this function: int func(int x1, int x2)?int0-1unknownDay 5 "Functions: The Basics"unknown@What is a variable that is visible from anywhere in the program?globalstaticlocal permanentDay 5 "Functions: The Basics"global:What is the function what begins execution of a C program?startbeginmainrunDay 5 "Functions: The Basics"main#Where are local variables declared?within main onlyoutside a functionwithin a functionnone of the aboveDay 5 "Functions: The Basics"within a function4How many elements are in this array: int data3[12]?36912Day 6 "Basic Program Control"12‰Given this for statement, what is the value of x when the condition statement evaluates to FALSE: for (x=0; x<10; x++) printf("%d", x);?091011Day 6 "Basic Program Control"103When is the increment step of a for loop evaluated?neverafter the initial statementafter the condition statement/after any C statements in the statement sectionDay 6 "Basic Program Control"/after any C statements in the statement section0What part of a for statement is evaluated first?initial expressioncondition expressionincrement expressionloop statementsDay 6 "Basic Program Control"initial expression4When are the loop statements of a for loop executed?*before the initial expression is evaluated,before the condition expression is evaluated+after the condition expression is evaluatednone of the aboveDay 6 "Basic Program Control"+after the condition expression is evaluated7When is the increment statement in a for loop executed?*before the initial expression is evaluated,before the condition expression is evaluated+after the condition expression is evaluated&after the loop statements are executedDay 6 "Basic Program Control"&after the loop statements are executed@What data construct is often used in conjunction with for loops?intchararrayfloatDay 6 "Basic Program Control"arrayhWhat C looping statement includes a variable initializer and incrementor, as well as the loop condition?whiledountilforDay 6 "Basic Program Control"forNWhich loop construct tests the condition prior to running the loop statements?whiledogotonone of the aboveDay 6 "Basic Program Control"while*What is the limit placed on nesting loops?316256no limitDay 6 "Basic Program Control"no limit&What is the escape sequence for a tab?\t\n\a\b)Day 7 "Fundamentals of Input and Output"\tMWhat is the percent sign followed by a single character in a printf function?escape sequenceliteralstringconversion specifier)Day 7 "Fundamentals of Input and Output"conversion specifierHow many elements are in the array int z[]={0, 3, 6, 12, 128}?1256Day 8 "Using Numeric Arrays"5FGiven the array int z[]={0, 3, 6, 12, 128}, what is the value of z[3]?612128 undefinedDay 8 "Using Numeric Arrays"12IGiven the array int x1[6] = [14, 12, 52, -7}, what is the value of x1[0]?1412-7 undefinedDay 8 "Using Numeric Arrays"14dGiven the array int Multi[2][3][2]={14,11,13,10,9,6,8,7,1,5,4,2}, how many elements are there total?14233212Day 8 "Using Numeric Arrays"12fGiven the array int Multi[2][3][2]={14,11,13,10,9,6,8,7,1,5,4,2}, what is the value of Multi[1][2][1]?214011Day 8 "Using Numeric Arrays"2fGiven the array int Multi[2][3][2]={14,11,13,10,9,6,8,7,1,5,4,2}, what is the value of Multi[0][1][0]?14111310Day 8 "Using Numeric Arrays"13>Which of the following creates a 3 by 2 two-dimensional array? int x[3][2]int x[][]={{0,0},{0,0},{0,0}} int x[32] both A and BDay 8 "Using Numeric Arrays" both A and B4What can a three-dimensional array be thought of as? checker board chess boardcubesheet of paperDay 8 "Using Numeric Arrays"cubejIf x is an integer variable, what is the correct way to assign the address of x to an integer pointer p_x? int p_x = x; int p_x = &x; int *p_x = x;int *p_x = &x;Day 9 "Understanding Pointers"int *p_x = &x;LAccessing the value of a variable using a pointer to the variable is called:variable access direct accessindirect accessgranted accessDay 9 "Understanding Pointers"indirect accessiIf d is a float type variable with the value of 17, what is displayed when printf("%p", &d); is executed?017 the address where d is allocated4002341Day 9 "Understanding Pointers" the address where d is allocated Assume that a single float occupies 4 bytes. Given a 1000 element array of floats, f, allocated beginning at memory location 2500, what is the address of f[0]?2500010003500Day 9 "Understanding Pointers"2500¹Assume that a single float occupies 4 bytes. Given a 1000 element array of floats, f, allocated beginning at memory location 2500, what is the address of the last element of the array?2500250464966500Day 9 "Understanding Pointers"6496¶Assume that a single float occupies 4 bytes. If p_values is a float pointer initialized to 2500, what address does the pointer contain after executing the following: p_values += 2 ?2500250225042508Day 9 "Understanding Pointers"2508šGiven the following variable declarations: int ar[7] = {0, 12, 5, 3, 8, 9, 23}; int *p_ar = ar; which of these are references to the second array element?ar[1] *(ar + 1) *(p_ar + 1)All of the aboveDay 9 "Understanding Pointers"All of the aboveŒWhat additional information should be passed into a function that takes an array as an argument in order to make it as flexible as possible?the first few array elementsthe last array elementthe array lengtha second arrayDay 9 "Understanding Pointers"the array length`What determines the actual number of bytes that the pointer moves when its value is incremented? current valuesize of the program array size data typeDay 9 "Understanding Pointers" data typeKWhich of the following is a valid integer pointer to an integer variable x?float *p_x = &x; int p_x = &x;int *p_x = &x; int *p_x = x;Day 9 "Understanding Pointers"int *p_x = &x;1What data types can be used to hold ASCII values?char unsigned charfloat both A and B Day 10 "Characters and Strings" both A and BIWhat data type must be used in order to represent the extended ASCII set?char unsigned charfloat both A and B Day 10 "Characters and Strings" unsigned charGA string in C is a sequence of characters terminated by what character?null character tab character whitespace single quote Day 10 "Characters and Strings"null character^How many characters are allocated for the following character array: char str[]="Title Text";?2101112 Day 10 "Characters and Strings"11XWhat type of parameters do the C standard library functions that manipulate strings use?the string elementsa pointer to the stringthe string length integers only Day 10 "Characters and Strings"a pointer to the string:What is specified by the parameter to the malloc function?$size of the memory block to allocate&the location of the memory to allocatethe type of memorya duration in seconds Day 10 "Characters and Strings"$size of the memory block to allocate>What returned value indicates that the malloc function failed?TRUEthe string "Failed"NULL-1 Day 10 "Characters and Strings"NULL(What function displays formatted string?putsprintfscanfgets Day 10 "Characters and Strings"printf6What C function allows the input of formatted strings?putsprintfgetsscanf Day 10 "Characters and Strings"scanftWhich of the following malloc calls will allocate enough space to hold the string "Test" (assuming 1 char = 1 byte)?char *str = (char *)malloc(1);char *str = (char *)malloc(3);char *str = (char *)malloc(5);char *str = (char *)malloc(4); Day 10 "Characters and Strings"char *str = (char *)malloc(5);¾What line contains the proper way to initialize the hours to 10, minutes to 0, and seconds to 30 for the following structure variable: struct time{int hours;int minutes;int seconds;} dob = ? {30, 0, 10}; {0, 10, 30}; {10, 0, 30}; {0, 30, 10};Day 11 "Structures" {10, 0, 30};QWhat is the indirect membership operator for accessing structures using pointers?**..->Day 11 "Structures"->+What keyword is used to declare structures?externregisterstructintDay 11 "Structures"structGiven a pointer to a structure instance, p_student, how can the structure member 'name' be referenced using the pointer variable?p_student.namep_student->namep_student->grade p_student->idDay 11 "Structures"p_student->name!<%8Day 14 "Working with the Screen, Printer, and Keyboard">2Which of these functions provide for string input?getsfgetsscanfall of the above8Day 14 "Working with the Screen, Printer, and Keyboard"all of the aboveaGiven the array declaration, int multi[3][4], where an int is 4 bytes, what is the size of multi?12364856&Day 15 "Pointers: Beyond the Basics"48NGiven the array declaration, int multi[3][4], what is the size of multi[0][0]?24812&Day 15 "Pointers: Beyond the Basics"4-Which choice declares an array of 7 pointers?int x_arr[7]; int *x_arr[7]; int (*x_arr)[7];none of the above&Day 15 "Pointers: Beyond the Basics"int *x_arr[7]; ‡Which of the following declares a 5 element array of char pointers and initializes the first four pointers to point to an empty string?"char *str[5]={"", "", "", "", ""};char *str[4]={"", "", ""};!char *str[]={"", "", "", "", ""};char *str[]={"", "", "", ""};&Day 15 "Pointers: Beyond the Basics""char *str[5]={"", "", "", "", ""};tIf func is a pointer to a function, which choice correctly initializes this pointer to point to the function calc_x?func = calc_x;func = calc_x();func = *calc_x;*func = calc_x;&Day 15 "Pointers: Beyond the Basics"func = calc_x;1Which of the following are types of linked lists?single-linked listsdouble-linked lists binary treesall of the above&Day 15 "Pointers: Beyond the Basics"all of the aboveGiven a structure called Client that is used in creating nodes of a linked list, this structure must contain at least one pointer of what type?charintClientfloat&Day 15 "Pointers: Beyond the Basics"ClientTWhen working with linked lists, what simple test is used to check for an empty list?4add a new element and then count the number of nodescall the IsListEmpty functioncheck for a NULL head pointernone of the above&Day 15 "Pointers: Beyond the Basics"check for a NULL head pointerCIn general, using linked lists makes heavy use of what C construct? char arrayspointers functionsstandard library calls&Day 15 "Pointers: Beyond the Basics"pointersMWhat type of linked list uses only a pointer to the next element in the list? Binary Treesingly-linked listdoubly-linked listrecursive list&Day 15 "Pointers: Beyond the Basics"singly-linked listJWhich fopen mode specifies that the file is to be opened for writing only?rr+awDay 16 "Using Disk Files"wLWhich fopen mode specifies that the file is to be opened for appending only?rr+awDay 16 "Using Disk Files"aBIf an error occurs during a call to fopen, what value is returned?-1"Error" End-Of-FileNULLDay 16 "Using Disk Files"NULL:Which library function supports formatted disk file input?fgetsfputsfprintffscanfDay 16 "Using Disk Files"fscanf;Which library function supports reading a line from a file?getc()fgetc()fgets()putc()Day 16 "Using Disk Files"fgets()?Which library function writes a line of characters to a stream?getc()putc()fputs()fgets()Day 16 "Using Disk Files"fputs()QWhich library function reads a block of data from a binary-mode file into memory?fread()fwrite()fscanf()fputs()Day 16 "Using Disk Files"fread()UWhich library function sets the file position indicator to the beginning of the file?backup()start()rewind()play()Day 16 "Using Disk Files"rewind()dWhat library function allows the file's position indicator to be set for any location within a file?rewind()ftell()fseek()feof()Day 16 "Using Disk Files"fseek()3Which library function allows a file to be deleted?feof()rewind()fseek()remove()Day 16 "Using Disk Files"remove()JWhich library function copies an entire string to another memory location?strcpystrncpystrlenstrcatDay 17 "Manipulating Strings"strcpynWhich library function copies a string and also performs its own memory allocation for the destination string?strcpystrcatstrncpystrdupDay 17 "Manipulating Strings"strdupmWhich library function appends a specified number of characters from one string to the end of another string?strcpystrncpystrncatstrcatDay 17 "Manipulating Strings"strncatSWhat value is returned from strcmp if the two strings being compared are identical?< 00> 01Day 17 "Manipulating Strings"0cWhat value is returned from strcmp if the first string is lexically greater than the second string?< 00> 01Day 17 "Manipulating Strings"> 0VWhat library function finds the first occurrence of a specified character in a string?strcmpstrncmpstrrchrstrchrDay 17 "Manipulating Strings"strchrrWhich library function searches one string for the first occurrence of any of the characters in the second string?strcspnstrncmpstrrchrstrchrDay 17 "Manipulating Strings"strcspnpWhat library function searches one string for the first occurrence of any character contained in another string?strcspnstrncmpstrrchrstrpbrkDay 17 "Manipulating Strings"strpbrkLWhich library function reverses the order of all the characters in a string?strcspnstrncmpstrrevstrchrDay 17 "Manipulating Strings"strrev4Which library function converts a string to a float?atoiatolatofstrchrDay 17 "Manipulating Strings"atofDWhere are function arguments placed prior to making a function call?stackarrayheapmemory%Day 18 "Getting More from Functions"stackƒWhat method of argument passing must be used if a function must be allowed to modify the value of the original argument's variable?passing by valuepassing by parameterpassing by referencenone of the above%Day 18 "Getting More from Functions"passing by referenceNLarge amounts of data should not be passed into a function using which method?passing by valuepassing by parameterpassing by referencenone of the above%Day 18 "Getting More from Functions"passing by value2What keyword is used to declare a generic pointer?inttypedefvoidregister%Day 18 "Getting More from Functions"void^What is the proper syntax to tell a program that the void pointer p is a pointer to type char?(char)p (char *)p (char *p)char *p%Day 18 "Getting More from Functions" (char *)ppWhat is used in an argument list to indicate zero or more additional arguments are to be passed into a function? parenthesisbracketsellipsis semicolon%Day 18 "Getting More from Functions"ellipsisTWhat is the name of the macro used to retrieve each argument from the variable list?va_listva_startva_argva_end%Day 18 "Getting More from Functions"va_argyWhen using a variable argument list in a function, what additional information must normally be provided to the function?!the number of variable arguments the name of the executablethe amount of free memorythe current directory%Day 18 "Getting More from Functions"!the number of variable arguments RWhen using variable argument lists, what type of variable holds the argument list?listva_list var_arg_listarg_list%Day 18 "Getting More from Functions"va_list<<>>Day 20 "Working with Memory"<<CWhat is the practice of dividing a program among two or more files? file divisionsimplificationmodular programmingnone of the aboveDay 21 "Advanced Compiler Use"modular programming?What is the name of the module that contains the main function? first moduleprimary modulesecondary module main moduleDay 21 "Advanced Compiler Use" main moduleSWhat type of file usually contains prototypes, #defines, and structure definitions? source file header file binary filesecondary fileDay 21 "Advanced Compiler Use" header fileIWhat type of file is created by linking all of the object files together? source file header file object fileexecutable fileDay 21 "Advanced Compiler Use"executable fileLWhat preprocessor directive is used to create symbolic constants and macros?#include#if#undef#defineDay 21 "Advanced Compiler Use"#define`What preprocessor directive is used to read a file and insert its contents into the source file?#include#if#undef#defineDay 21 "Advanced Compiler Use"#includeNWhat preprocessor directive is used to start the 'else' clause of a #if block?#include#else#elif#endifDay 21 "Advanced Compiler Use"#else8What preprocessor directive is used to end an #if block?#include#else#elif#endifDay 21 "Advanced Compiler Use"#endifIWhat predefined macro is replaced by the current source file line number?__TIME____LINE____FILE____DATE__Day 21 "Advanced Compiler Use"__LINE__BWhat predefined macro is replaced by the current source file name?__TIME____LINE____FILE____DATE__Day 21 "Advanced Compiler Use"__FILE__-Which C operator is the bitwise AND operator?&|^~Day 20 "Working with Memory"&-Which C operator is the bitwise EOR operator?&|^~Day 20 "Working with Memory"^3Which C operator reverses every bit in its operand?&|^~~