Use the function below for problem #2 Use the function below for problem #3
|
|
- Horace Ross
- 7 years ago
- Views:
Transcription
1 1. Which of the following is TRUE regarding arrays? [A]The name of the array represents the first value in the array. [B] The name of the array represents all values found in the array. [C] The name of the array represents where it is located in the memory of the computer. int getdata(int d[]) int ct = 0; Use the function below for problem #2 do printf("enter data #%d or -1 to exit: ", ct + 1); scanf("%d", &d[ct]); ct++; while(ct < MAXSIZE && d[ct - 1] > -1); //MISSING RETURN STATEMENT GOES HERE 2. Which of the following represents the number of non-negative integers entered by the user from the function above (MAXSIZE represents the defined size of the array)? [A]The value of the variable ct should always be returned. [B] The value of the expression ct 1 should always be returned. [C] The value of the expression ct 1 should only been returned when the -1 value has been input by the user. Use the function below for problem #3 void changearray(int x[]) int temp; int i; for(i = 0; i < SIZE; i++) temp = x[i]; x[i] = x[size i]; x[size i] = temp; 3. Which of the following describes the result of the function provided on the left (where SIZE is the defined size of the array)? [A] The order of the elements in the array are reversed. [B] The elements in the array are in the same order after the loop as they were before the loop. [C] One element in the array has been identified to be exchanged similar to one pass through the selection sorting algorithm.
2 #define SIZE 11 Use the code below for problem #4 void addnum(int[]); int main() int x[11] = 3, 2, 5, 4, 11, 8, 9, 10, 7, 6, 1; addnum(x); printf("x[3] = %d\n", x[3]); return(0); void addnum(int x[]) int i; for(i = 1; i < SIZE; i++) x[i] = x[i] + x[i - 1]; 4. Which of the following is the output produced by the code segment above? [A] x[3] = 10 [B] x[3] = 14 [C] x[3] = 9 Use the code below for problem #5 #define SIZE 7 void changeelement(int, int*); int main() int lcv; int ary[size] = 1; for(lcv = 1; lcv < SIZE; lcv++) changeelement(ary[lcv - 1], &ary[lcv]); printf("ary[5] = %d\n", ary[5]); return(0); void changeelement(int x, int *y) *y = 2 * x; 5. Which of the following is the output produced by the code segment above? [A] ary[5] = 16 [B] ary[5] = 32 [C] ary[5] = 64
3 #include<stdio.h> Use the code below for problem #6 int main() int array[5] = 5, 4, 3, 2, 1; int i = 0; while(i < 4) array[i] = array[i] % array[i + 1]; i++; return(0); 6. Which index in the array above represents a value that is different from all of the other elements? [A] 4 [C] 2 [B] 3 Use the array below for problems 7 8 int array[13] = 10, 12, 13, 14, 15, 16, 18, 20, 21, 23, 24, 25, 33; 7. Which of the following represents the values of the variable mid in the binary search algorithm when applying that algorithm to seek the target value 24? [A]6, 9, 10 [C] 6, 10 [B] 6, 9, 11, Which of the following represents the values of the variable mid in the binary search algorithm when applying that algorithm to seek the target value 11? [A]6, 2, 1 [C] 6, 2, 0, 1 [B] 6, 2, 0 Use the array below for problem #19 int data[13] = 10, 10, 10, 14, 15, 16, 18, 20, 21, 23, 24, 25, 33; 9. Which of the following represents the number of comparisons output from lab #12 given the array above and the target value 10? [A] Total number of comparisons required: 5 [B] Total number of comparisons required: 6 [C] Total number of comparisons required: 7 Use the array below for problem #10 int data[13] = 10, 10, 10, 14, 15, 16, 18, 20, 21, 21, 21, 25, 33; 10. Which of the following represents the number of comparisons output from lab #12 given the array above and the target value 21? [A] Total number of comparisons required: 5 [B] Total number of comparisons required: 6 [C] Total number of comparisons required: 7
4 Use the array below for problem #11 int data[13] = 10, 5, 10, 8, 1, 1, 8, 8, 21, 21, 21, 5, 3; 11. Which of the following represents the number of comparisons output from lab #12 given the array above and the target value 21? [A] Total number of comparisons required: 3 [B] Total number of comparisons required: 11 [C] Total number of comparisons required: 13 Given the following array: int x[7] = 4, 6, 8, 2, 0, 5, 3; And the array after two passes through one of the three sorting algorithms: Which sorting algorithm has been applied? [A]Selection Sort [B] Insertion Sort [C] Bubble Sort [D]More than one of the above. Given the following array: int x[7] = 4, 6, 8, 2, 0, 5, 3; And the array after two passes through one of the three sorting algorithms: Which sorting algorithm has been applied? [A]Selection Sort [B] Insertion Sort [C] Bubble Sort [D]More than one of the above.
5 Given the following array: int x[7] = 3, 5, 4, 6, 8, 7, 9; And the array after two passes through one of the three sorting algorithms: Which sorting algorithm has been applied? [A]Selection Sort [B] Insertion Sort [C] Bubble Sort [D]More than one of the above. Given the following array: int x[7] = 3, 5, 4, 6, 8, 7, 9; And the array after two passes through one of the three sorting algorithms: Which sorting algorithm has been applied? [A]Selection Sort [B] Insertion Sort [C] Bubble Sort [D]More than one of the above. Given the following array: int x[7] = 3, 5, 4, 6, 8, 7, 9; And the array after two passes through one of the three sorting algorithms: Which sorting algorithm has been applied? [A]Selection Sort [B] Insertion Sort [C] Bubble Sort [D]More than one of the above.
6 #include<stdio.h> #include<string.h> Use the program below for problems int main() char str1[30] = "Final Exam Thursday"; char str2[25]; strcpy(str2, str1); printf("str2 length = %d\n", strlen(str2)); strcpy(str1, str2); printf("str1 length = %d\n", strlen(str2)); return(0); 17. What is the output generated by the first print statement in the program above? [A] str2 length = 19 [C] str2 length = 25 [B] str2 length = What is the output generated by the second print statement in the program above? [A] str1 length = 19 [C] str1 length = 30 [B] str1 length = 25 int a = 3; int b; int *x; int *y; x = &a; y = x; *x = 1; a = 5; Use the code segment below for problems printf("*x = %3d *y = %3d a = %3d\n", *x, *y, a); x = &b; b = 11; printf("*x = %3d *y = %3d a = %3d b = %3d\n", *x, *y, a, b); 19. What is the output generated by the first print statement in the code segment above? [A] *x = 1 *y = 1 a = 5 [B] *x = 5 *y = 1 a = 5 [C] *x = 5 *y = 5 a = What is the output generated by the second print statement in the code segment above? [A] *x = 11 *y = 11 a = 5 b = 11 [B] *x = 11 *y = 5 a = 5 b = 11 [C] *x = 5 *y = 1 a = 5 b = 11
7 21. Which of the following is result of using an incorrect placeholder in a printf function? [A] The compiler will issue a warning. [B] The results will be converted to meet the data type of the placeholder used similar to an explicit data type conversion. [C] The results will be converted to meet the data type of the placeholder used similar to an implicit data type conversion. 22. Which of the following statements is TRUE? [A] Any function that utilizes pass by address must have a void return type. [B] Any function that utilizes pass by address must use pass by address for all parameters. [C] Both A and B. int c = -1; int d = 1; int result; Use the code below for problem #23 result = d-- ++c; printf("c = %d d = %d\n", c, d); 23. Which of the following is the output of the print statement of the code above? [A] c = 0 d = 0 [C] c = 0 d = -1 [B] c = -1 d = Which of the following logical expressions is the complement of the expression below? a > b && a > c [A] a > b a > c [B] a < b a < c [C] a <= b && a <= c 25. Which of the following logical expressions is the complement of the expression below? [A] a == b b == c a == c [B] a!= b && b!= c && a!= c int x = 3; int y = 2; int z = 3; a!= b b!= c a!= c Use the code below for problem #26 printf("result #1 = %d\n", x <= 3 y >= 2 && z!= 3); printf("result #2 = %d\n", x <= 3 (y >= 2 && z!= 3)); printf("result #3 = %d\n", (x <= 3 y >= 2) && z!= 3); 26. Which of the following is TRUE regarding the code segment above? [A] All three results will generate the same value. [B] Only results #1 and #3 will generate the same value. [C] Only results #1 and #2 will generate the same value. [C] a == b && b == c && a == c
8 Use the code below for problem #27 int a = 732; int b = 81912; if(a % b < 500) a = 0; else if(a % b > 700) b = 0; else a = 0; b = 0; printf("a = %d b = %d\n", a, b); 27. Which of the following is the output of the code segment above? [A] a = 732 b = 0 [B] a = 0 b = [C] a = 0 b = 0 Use the code below for problem #28 if(score >= MINA) grade = 'A'; else if(score >= MINB && score < MINA) grade = 'B'; else if(score >= MINC && score < MINB) grade = 'C'; else if(score >= MIND && score < MINC) grade = 'D'; else grade = 'F'; 28. Which of the following is TRUE regarding the if/else if/else construct above? [A]The second condition in each of the else if's are complements of the first condition in the previous if or else if and are unnecessary because only the statements associated with the first true condition are executed in an if/else if/else construct. [B] The second condition in each of the else if's are necessary because an if/else if/else construct will continue to execute statements found within all true conditions in an if/else if/else construct. [C] Both conditions of each else if are necessary because statements associated with a true condition could potentially alter the values of variables used in later conditions in an if/else if/else construct. int x = 3; int y = 2; int z = 1; z = x - y - z? x++ : ++y; printf("x = %d y = %d z = %d\n", x, y, z); Use the code below for problem # Which of the following is the output of the code segment above? [A] x = 3 y = 3 z = 2 [B] x = 4 y = 3 z = 3 [C] x = 3 y = 3 z = 3
9 int month = 3; int year = 2000; int day = 2; Use the code below for problem #30 switch(month) case 5: day += 30; case 4: day += 31; case 3: day += 28 + ((!(year % 4) && (year % 100))!(year % 400)); case 2: day += 31; printf("day = %d\n", day); 30. What is the output produced by the code segment above? [A] day = 62 [B] day = 61 int main() int x = 35; int y = 7; int z = -1; switch(x % y == 0) case 0: z = 1; break; case 1: z = 0; break; printf("z = %d\n", z); [C] day = 60 Use the code below for problems return(0); 31. Which of the following switch statement rules is being violated by the code segment above? [A] The control expression must be integral. [B] Each case label is the keyword case followed by a constant expression. [C] No two case labels can have the same value. 32. Which of the following is the output generated by the code segment above? [A] z = -1 [C] z = 1 [B] z = Which of the following will result in an infinite loop? The variable used in each for loop has been declared as an integer. [A] for(i = 0; i!= ; i += 10) [C] for(i = 0; i < 85; i + 17) [B] for(i = 0; i % 169 > 0; i = i + 13)
10 5 int y = 0; 6 int x = 34219; 7 8 do 9 10 y *= 10; 11 y += x % 10; 12 x /= 10; 13 while(x > 0); printf("y = %d\n", y); Use the code below for problems Which of the following is the output generated by the code segment above? [A] y = 19 [C] y = 9124 [B] y = Which of the following is the output generated by the code segment above if line 10 was removed? [A] y = 19 [C] y = 0 [B] y = Which of the following would NOT produce the same results as the original code above [replacing lines 8 13] given that the variable x will always be a non-negative integer? [A] [B] [C] [D] while(x > 0) y *= 10; y += x % 10; x /= 10; for(x = 34219; x > 0; x /= 10) y *= 10; y += x % 10; do y *= 10; y += x % 10; x /= 10; while(x!= 0); None of the above.
11 int row; int col; int sz; Use the code below for problems for(row = 0; row <= sz; row++) for(col = 0; col <= sz; col++) if(col == sz - row + 1) printf("%d", sz); else printf("%c", '$'); printf("\n"); 37. Given that the variable sz is assigned a value of 5, which of the following is the first line of output generated by the code segment above? [A] $$$$$$ [C] $$$$5$ [B] $$$$$5 38. Given that the variable sz is assigned a value of 5, which of the following is the last line of output generated by the code segment above? [A] $$$$$$ [C] $5$$$$ [B] 5$$$$$ 39. Given that the variable sz is assigned a value of 5, what is the total number of characters ($ and 5) displayed to the monitor? [A]30 [C] 25 [B] Which of the following is used to visually represent the algorithm of a single function? [A] A Flowchart [C] A Specification Chart [B] A Structure Chart 41. According to course standards, which of the following would never be given a global scope? [A]Function prototypes. [C] Variables. [B] Function definitions. 42. Which of the following is TRUE regarding scope? [A]It is poor programming style to reuse identifiers within the same scope. [B] It is poor programming style to reuse identifiers with non-overlapping scope. [C] It is always poor programming style to reuse identifiers. 43. Which of the following can be detected by the compiler? [A]A reference to an array index value that exceeds the defined limits of the array. [B] A loop control expression that will result in an infinite loop. [C] A function call that includes fewer parameters than was specified in the function prototype.
12 int a = 7; int b = 11; int c; float d = 4.85; c = (float) (b / a); printf("c = %d\n", c); Use the code below for problems What is the first output generated by the code on the left? [A] c = 0 [B] c = 1 [C] c = 2 c = a / (float) b + 0.5; printf("c = %d\n", c); c = (int) d / b + 0.5; printf("c = %d\n", c); 45. What is the second output generated by the code above? [A] c = 0 [B] c = What is the third output generated by the code above? [A] c = 0 [B] c = 1 [C] c = 2 [C] c = 2
13 47. Which of the following file functions utilizes the name of the external file being accessed rather than the name of the file handle variable? [A] fopen [C] fclose [B] fscanf [D] Both A and C. 48. Which of the following is FALSE regarding the scanf function in the C programming language and the fscanf function in MATLAB (or Octave)? [A]The fscanf function in MATLAB (or Octave) has no address list similar to the scanf function in C. [B] The fscanf function in MATLAB (or Octave) includes the name of the file handle variable to indicate the source of the data. [C] The format string in C's scanf function uses double quotes while the format string in MATLAB's fscanf function uses single quotes. 49. Which of the following is the result of attempting to redirect output from an executable (a.out) file to an existing file? [A]The existing file is over-written. [B] The operating system reports an error that it cannot over-write an existing file. [C] A new file with an additional character in its name is created to distinguish it from the existing file. 50. What should you be sure to do when contacting the instructor regarding your course grade? [A]Wait until minimums for each letter grade are announced. [B] Be sure to use your Purdue address and state which course you were taking. [C] Provide specific concerns you have with specific assignments as grades in the course will be based on points earn and not factors external to the course. [D]All of the above.
14 This page lists C operators in order of precedence (highest to lowest). Their associativity indicates in what order operators of equal precedence in an expression are applied. Operator Description Associativity () []. -> ! ~ (type) * & sizeof Parentheses (function call) (see Note 1) Brackets (array subscript) Member selection via object name Member selection via pointer Postfix increment/decrement (see Note 2) Prefix increment/decrement Unary plus/minus Logical negation/bitwise complement Cast (change type) Dereference Address Determine size in bytes left-to-right right-to-left * / % Multiplication/division/modulus left-to-right + - Addition/subtraction left-to-right << >> Bitwise shift left, Bitwise shift right left-to-right < <= > >= Relational less than/less than or equal to Relational greater than/greater than or equal to left-to-right ==!= Relational is equal to/is not equal to left-to-right & Bitwise AND left-to-right ^ Bitwise exclusive OR left-to-right Bitwise inclusive OR left-to-right && Logical AND left-to-right Logical OR left-to-right?: Ternary conditional right-to-left = += -= *= /= %= &= ^= = <<= >>= Assignment Addition/subtraction assignment Multiplication/division assignment Modulus/bitwise AND assignment Bitwise exclusive/inclusive OR assignment Bitwise shift left/right assignment right-to-left, Comma (separate expressions) left-to-right
15 ASCII Table Char Dec Char Dec Char Dec Char Dec (nul) 0 space 64 ` 96 (soh) 1! 33 A 65 a 97 (stx) 2 " 34 B 66 b 98 (etx) 3 # 35 C 67 c 99 (eot) 4 $ 36 D 68 d 100 (enq) 5 % 37 E 69 e 101 (ack) 6 & 38 F 70 f 102 (bel) 7 39 G 71 g 103 (bs) 8 ( 40 H 72 h 104 (ht) 9 ) 41 I 73 i 105 (nl) 10 * 42 J 74 j 106 (vt) K 75 k 107 (np) 12, 44 L 76 l 108 (cr) M 77 m 109 (so) N 78 n 110 (si) 15 / 47 O 79 o 111 (dle) P 80 p 112 (dc1) Q 81 q 113 (dc2) R 82 r 114 (dc3) S 83 s 115 (dc4) T 84 t 116 (nak) U 85 u 117 (syn) V 86 v 118 (etb) W 87 w 119 (can) X 88 x 120 (em) Y 89 y 121 (sub) 26 : 58 Z 90 z 122 (esc) 27 ; 59 [ (fs) 28 < 60 \ (gs) 29 = 61 ] (rs) 30 > 62 ^ 94 ~ 126 (us) 31? 63 _ 95 (del) 127
16 Lab Time Lab Day Location and TA Section 7:30 Tuesday SC 189 Jessica Sparks :30 Tuesday SC 189 Sebastian Lee :30 Tuesday SC 189 Amir Warsanah :30 Tuesday SC 189 Nicki Schrank :30 Wednesday SC 189 Kuan-Po Chen :30 Wednesday SC 189 Caleb Bean :30 Wednesday SC 189 Alyssa Welles :30 Thursday SC 189 Ryne Rayburn :30 Thursday SC 289 Xi Luo :30 Thursday SC 189 Mike James :30 Thursday SC 189 John Grabarczyk 2101
Memory is implemented as an array of electronic switches
Memory Structure Memory is implemented as an array of electronic switches Each switch can be in one of two states 0 or 1, on or off, true or false, purple or gold, sitting or standing BInary digits (bits)
More informationNumeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:
Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger
More informationThis is great when speed is important and relatively few words are necessary, but Max would be a terrible language for writing a text editor.
Dealing With ASCII ASCII, of course, is the numeric representation of letters used in most computers. In ASCII, there is a number for each character in a message. Max does not use ACSII very much. In the
More informationBI-300. Barcode configuration and commands Manual
BI-300 Barcode configuration and commands Manual 1. Introduction This instruction manual is designed to set-up bar code scanner particularly to optimize the function of BI-300 bar code scanner. Terminal
More informationASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot
ASCII Code Data coding Morse code was the first code used for long-distance communication. Samuel F.B. Morse invented it in 1844. This code is made up of dots and dashes (a sort of binary code). It was
More informationXi2000 Series Configuration Guide
U.S. Default Settings Sequence Reset Scanner Xi2000 Series Configuration Guide Auto-Sense Mode ON UPC-A Convert to EAN-13 OFF UPC-E Lead Zero ON Save Changes POS-X, Inc. 2130 Grant St. Bellingham, WA 98225
More informationURL encoding uses hex code prefixed by %. Quoted Printable encoding uses hex code prefixed by =.
ASCII = American National Standard Code for Information Interchange ANSI X3.4 1986 (R1997) (PDF), ANSI INCITS 4 1986 (R1997) (Printed Edition) Coded Character Set 7 Bit American National Standard Code
More informationSources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
More informationDEBT COLLECTION SYSTEM ACCOUNT SUBMISSION FILE
CAPITAL RESOLVE LTD. DEBT COLLECTION SYSTEM ACCOUNT SUBMISSION FILE (DCS-ASF1107-7a) For further technical support, please contact Clive Hudson (IT Dept.), 01386 421995 13/02/2012 Account Submission File
More informationChapter 1. Binary, octal and hexadecimal numbers
Chapter 1. Binary, octal and hexadecimal numbers This material is covered in the books: Nelson Magor Cooke et al, Basic mathematics for electronics (7th edition), Glencoe, Lake Forest, Ill., 1992. [Hamilton
More informationplc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationChapter 5. Binary, octal and hexadecimal numbers
Chapter 5. Binary, octal and hexadecimal numbers A place to look for some of this material is the Wikipedia page http://en.wikipedia.org/wiki/binary_numeral_system#counting_in_binary Another place that
More informationVoyager 9520/40 Voyager GS9590 Eclipse 5145
Voyager 9520/40 Voyager GS9590 Eclipse 5145 Quick Start Guide Aller à www.honeywellaidc.com pour le français. Vai a www.honeywellaidc.com per l'italiano. Gehe zu www.honeywellaidc.com für Deutsch. Ir a
More informationBARCODE READER V 2.1 EN USER MANUAL
BARCODE READER V 2.1 EN USER MANUAL INSTALLATION OF YOUR DEVICE PS-2 Connection RS-232 Connection (need 5Volts power supply) 1 INSTALLATION OF YOUR DEVICE USB Connection 2 USING THIS MANUAL TO SETUP YOUR
More informationCreate!form Barcodes. User Guide
Create!form Barcodes User Guide Barcodes User Guide Version 6.3 Copyright Bottomline Technologies, Inc. 2008. All Rights Reserved Printed in the United States of America Information in this document is
More informationBAR CODE 39 ELFRING FONTS INC.
ELFRING FONTS INC. BAR CODE 39 This package includes 18 versions of a bar code 39 font in scalable TrueType and PostScript formats, a Windows utility, Bar39.exe, that helps you make bar codes, and Visual
More informationSymbols in subject lines. An in-depth look at symbols
An in-depth look at symbols What is the advantage of using symbols in subject lines? The age of personal emails has changed significantly due to the social media boom, and instead, people are receving
More informationASCII CODES WITH GREEK CHARACTERS
ASCII CODES WITH GREEK CHARACTERS Dec Hex Char Description 0 0 NUL (Null) 1 1 SOH (Start of Header) 2 2 STX (Start of Text) 3 3 ETX (End of Text) 4 4 EOT (End of Transmission) 5 5 ENQ (Enquiry) 6 6 ACK
More informationCHAPTER 8 BAR CODE CONTROL
CHAPTER 8 BAR CODE CONTROL CHAPTER 8 BAR CODE CONTROL - 1 CONTENTS 1. INTRODUCTION...3 2. PRINT BAR CODES OR EXPANDED CHARACTERS... 4 3. DEFINITION OF PARAMETERS... 5 3.1. Bar Code Mode... 5 3.2. Bar Code
More informationI PUC - Computer Science. Practical s Syllabus. Contents
I PUC - Computer Science Practical s Syllabus Contents Topics 1 Overview Of a Computer 1.1 Introduction 1.2 Functional Components of a computer (Working of each unit) 1.3 Evolution Of Computers 1.4 Generations
More informationarrays C Programming Language - Arrays
arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)
More informationCharacters & Strings Lesson 1 Outline
Outline 1. Outline 2. Numeric Encoding of Non-numeric Data #1 3. Numeric Encoding of Non-numeric Data #2 4. Representing Characters 5. How Characters Are Represented #1 6. How Characters Are Represented
More informationObject Oriented Software Design
Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 14, 2011 G. Lipari (Scuola Superiore Sant Anna) Introduction
More informationEmbedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
More informationThe ASCII Character Set
The ASCII Character Set The American Standard Code for Information Interchange or ASCII assigns values between 0 and 255 for upper and lower case letters, numeric digits, punctuation marks and other symbols.
More informationObject Oriented Software Design
Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction
More informationEducation: P.h.D. Candidate (Santa Clara University, California) M.S. in Computer Engineering (Santa Clara University, California)
Instructor: Professor Neena Kaushik Education: P.h.D. Candidate (Santa Clara University, California) M.S. in Computer Engineering (Santa Clara University, California) M.S. in Biomedical Engineering (Northwestern
More informationCS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013
Oct 4, 2013, p 1 Name: CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013 1. (max 18) 4. (max 16) 2. (max 12) 5. (max 12) 3. (max 24) 6. (max 18) Total: (max 100)
More informationSenem Kumova Metin & Ilker Korkmaz 1
Senem Kumova Metin & Ilker Korkmaz 1 A loop is a block of code that can be performed repeatedly. A loop is controlled by a condition that is checked each time through the loop. C supports two categories
More informationDL910 SERIES. Instruction Manual
DL910 SERIES Instruction Manual DL910 SERIES INSTRUCTION MANUAL ALL RIGHTS RESERVED Datalogic reserves the right to make modifications and improvements without prior notification. Datalogic shall not
More informationModel 200 / 250 / 260 Programming Guide
Model 200 / 250 / 260 Programming Guide E-SEEK Inc. R & D Center 9471 Ridgehaven Court #E San Diego, CA 92123 Tel: 858-495-1900 Fax: 858-495-1901 Sales & Marketing 245 Fischer Ave #D5 Costa Mesa, CA 92626
More informationKeywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void
1. Explain C tokens Tokens are basic building blocks of a C program. A token is the smallest element of a C program that is meaningful to the compiler. The C compiler recognizes the following kinds of
More informationC Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands
C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is
More informationOutline. Conditional Statements. Logical Data in C. Logical Expressions. Relational Examples. Relational Operators
Conditional Statements For computer to make decisions, must be able to test CONDITIONS IF it is raining THEN I will not go outside IF Count is not zero THEN the Average is Sum divided by Count Conditions
More informationKITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
More informationTELOCATOR ALPHANUMERIC PROTOCOL (TAP)
TELOCATOR ALPHANUMERIC PROTOCOL (TAP) Version 1.8 February 4, 1997 TABLE OF CONTENTS 1.0 Introduction...1 2.0 TAP Operating Environment...1 3.0 Recommended Sequence Of Call Delivery From An Entry Device...2
More informationSecurity Protection of Software Programs by Information Sharing and Authentication Techniques Using Invisible ASCII Control Codes
International Journal of Network Security, Vol.10, No.1, PP.1 10, Jan. 2010 1 Security Protection of Software Programs by Information Sharing and Authentication Techniques Using Invisible ASCII Control
More informationThe C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
More informationVB.NET Programming Fundamentals
Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements
More informationAP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
More informationC PROGRAMMING FOR MATHEMATICAL COMPUTING
UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION BSc MATHEMATICS (2011 Admission Onwards) VI Semester Elective Course C PROGRAMMING FOR MATHEMATICAL COMPUTING QUESTION BANK Multiple Choice Questions
More informationMemory management. Announcements. Safe user input. Function pointers. Uses of function pointers. Function pointer example
Announcements Memory management Assignment 2 posted, due Friday Do two of the three problems Assignment 1 graded see grades on CMS Lecture 7 CS 113 Spring 2008 2 Safe user input If you use scanf(), include
More informationName: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
More informationC / C++ and Unix Programming. Materials adapted from Dan Hood and Dianna Xu
C / C++ and Unix Programming Materials adapted from Dan Hood and Dianna Xu 1 C and Unix Programming Today s goals ú History of C ú Basic types ú printf ú Arithmetic operations, types and casting ú Intro
More informationAbout The Tutorial. Audience. Prerequisites. Copyright & Disclaimer
About The Tutorial C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system.
More informationPhys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions
Phys4051: C Lecture 2 & 3 Functions (Review) Comment Statements Variables & Operators Branching Instructions Comment Statements! Method 1: /* */! Method 2: // /* Single Line */ //Single Line /* This comment
More informationBarcode Magstripe. Decoder & Scanner. Programming Manual
Barcode Magstripe Decoder & Scanner Programming Manual CONTENTS Getting Started... 2 Setup Procedures... 3 Setup Flow Chart...4 Group 0 : Interface Selection... 5 Group 1 : Device Selection for keyboard
More informationCommand Emulator STAR Line Mode Command Specifications
Line Thermal Printer Command Emulator STAR Line Mode Command Specifications Revision 0.01 Star Micronics Co., Ltd. Special Products Division Table of Contents 1. Command Emulator 2 1-1) Command List 2
More information5 Arrays and Pointers
5 Arrays and Pointers 5.1 One-dimensional arrays Arrays offer a convenient way to store and access blocks of data. Think of arrays as a sequential list that offers indexed access. For example, a list of
More informationJava Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationRepresentação de Caracteres
Representação de Caracteres IFBA Instituto Federal de Educ. Ciencia e Tec Bahia Curso de Analise e Desenvolvimento de Sistemas Introdução à Ciência da Computação Prof. Msc. Antonio Carlos Souza Coletânea
More informationC Examples! Jennifer Rexford!
C Examples! Jennifer Rexford! 1 Goals of this Lecture! Help you learn about:! The fundamentals of C! Deterministic finite state automata (DFA)! Expectations for programming assignments! Why?! The fundamentals
More informationCS1020 Data Structures and Algorithms I Lecture Note #1. Introduction to Java
CS1020 Data Structures and Algorithms I Lecture Note #1 Introduction to Java Objectives Java Basic Java features C Java Translate C programs in CS1010 into Java programs 2 References Chapter 1 Section
More informationMULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java
More informationInformatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
More informationLecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists
Lecture 11 Doubly Linked Lists & Array of Linked Lists In this lecture Doubly linked lists Array of Linked Lists Creating an Array of Linked Lists Representing a Sparse Matrix Defining a Node for a Sparse
More informationBar Code Reader Models 1000/1002 USER'S MANUAL 2190 Regal Parkway Euless, TX 76040 (817) 571-9015 (800) 648-4452 FAX (817) 685-6232 FCC NOTICE WARNING: This equipment generates, uses and can radiate radio
More informationIteration CHAPTER 6. Topic Summary
CHAPTER 6 Iteration TOPIC OUTLINE 6.1 while Loops 6.2 for Loops 6.3 Nested Loops 6.4 Off-by-1 Errors 6.5 Random Numbers and Simulations 6.6 Loop Invariants (AB only) Topic Summary 6.1 while Loops Many
More information7-Bit coded Character Set
Standard ECMA-6 6 th Edition - December 1991 Reprinted in electronic form in August 1997 Standardizing Information and Communication Systems 7-Bit coded Character Set Phone: +41 22 849.60.00 - Fax: +41
More informationC++FA 5.1 PRACTICE MID-TERM EXAM
C++FA 5.1 PRACTICE MID-TERM EXAM This practicemid-term exam covers sections C++FA 1.1 through C++FA 1.4 of C++ with Financial Applications by Ben Van Vliet, available at www.benvanvliet.net. 1.) A pointer
More informationPART-A Questions. 2. How does an enumerated statement differ from a typedef statement?
1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members
More informationStorage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
More information1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
More informationMK-SERIE 1000/1500/2000 AllOfBarcode.de Michael Krug - 83278Traunstein BARCODE SCANNER
MK-SERIE 1000/1500/2000 AllOfBarcode.de Michael Krug - 83278Traunstein BARCODE SCANNER Configuration Guide - 1 - Table of Contents Chapter 1 System Information 1.1 About this manual 3 1.2 How to set up
More informationCertified PHP Developer VS-1054
Certified PHP Developer VS-1054 Certification Code VS-1054 Certified PHP Developer Vskills certification for PHP Developers assesses the candidate for developing PHP based applications. The certification
More informationC++ Language Tutorial
cplusplus.com C++ Language Tutorial Written by: Juan Soulié Last revision: June, 2007 Available online at: http://www.cplusplus.com/doc/tutorial/ The online version is constantly revised and may contain
More informationPROGRAMMING IN C PROGRAMMING IN C CONTENT AT A GLANCE
PROGRAMMING IN C CONTENT AT A GLANCE 1 MODULE 1 Unit 1 : Basics of Programming Unit 2 : Fundamentals Unit 3 : C Operators MODULE 2 unit 1 : Input Output Statements unit 2 : Control Structures unit 3 :
More informationThe programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
More informationPart No. : MUL-53221-07 PROGRAMMING GUIDE
Part No. : MUL-53221-07 PROGRAMMING GUIDE PROGRAMMING GUIDE for BARCODE SCANNERS The guide can be used as keyboard emulation, RS- 232C serial interface, and USB 1.1 interface and wand emulation. IMPORTANT
More informationStatements and Control Flow
Contents 1. Introduction 2. Types and Variables 3. Statements and Control Flow 4. Reading Input 5. Classes and Objects 6. Arrays 7. Methods 8. Scope and Lifetime 9. Utility classes 10. Introduction to
More informationIntroduction to Java
Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high
More informationUIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything
More informationModule 816. File Management in C. M. Campbell 1993 Deakin University
M. Campbell 1993 Deakin University Aim Learning objectives Content After working through this module you should be able to create C programs that create an use both text and binary files. After working
More informationSymbol Tables. Introduction
Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The
More informationJava Basics: Data Types, Variables, and Loops
Java Basics: Data Types, Variables, and Loops If debugging is the process of removing software bugs, then programming must be the process of putting them in. - Edsger Dijkstra Plan for the Day Variables
More information3/13/2012. Writing Simple C Programs. ESc101: Decision making using if-else and switch statements. Writing Simple C Programs
Writing Simple C Programs ESc101: Decision making using if- and switch statements Instructor: Krithika Venkataramani Semester 2, 2011-2012 Use standard files having predefined instructions stdio.h: has
More informationMoving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
More informationLecture 2 Notes: Flow of Control
6.096 Introduction to C++ January, 2011 Massachusetts Institute of Technology John Marrero Lecture 2 Notes: Flow of Control 1 Motivation Normally, a program executes statements from first to last. The
More informationDalhousie University CSCI 2132 Software Development Winter 2015 Lab 7, March 11
Dalhousie University CSCI 2132 Software Development Winter 2015 Lab 7, March 11 In this lab, you will first learn how to use pointers to print memory addresses of variables. After that, you will learn
More informationHandout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
More informationASCII Characters. 146 CHAPTER 3 Information Representation. The sign bit is 1, so the number is negative. Converting to decimal gives
146 CHAPTER 3 Information Representation The sign bit is 1, so the number is negative. Converting to decimal gives 37A (hex) = 134 (dec) Notice that the hexadecimal number is not written with a negative
More informationMINIMAG. Magnetic Stripe Reader Keyboard Wedge. User s Manual
MINIMAG Magnetic Stripe Reader Keyboard Wedge User s Manual TM Agency Approved Specifications for subpart B of part 15 of FCC rule for a Class A computing device. Limited Warranty ID TECH warrants to the
More informationFEEG6002 - Applied Programming 5 - Tutorial Session
FEEG6002 - Applied Programming 5 - Tutorial Session Sam Sinayoko 2015-10-30 1 / 38 Outline Objectives Two common bugs General comments on style String formatting Questions? Summary 2 / 38 Objectives Revise
More informationC++ Programming Language
C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract
More informationDNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk
DNA Data and Program Representation Alexandre David 1.2.05 adavid@cs.aau.dk Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued
More informationBarcode Scanning Made Easy. Programming Guide
Barcode Scanning Made Easy Programming Guide CCD Scanner Programming Guide Please Read Note: The Wasp WCS3900 Series Scanners are ready to scan the most popular barcodes out of the box. This manual should
More informationDigital Logic Design. Introduction
Digital Logic Design Introduction A digital computer stores data in terms of digits (numbers) and proceeds in discrete steps from one state to the next. The states of a digital computer typically involve
More informationOne Dimension Array: Declaring a fixed-array, if array-name is the name of an array
Arrays in Visual Basic 6 An array is a collection of simple variables of the same type to which the computer can efficiently assign a list of values. Array variables have the same kinds of names as simple
More informationManagement Information Systems 260 Web Programming Fall 2006 (CRN: 42459)
Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459) Class Time: 6:00 8:05 p.m. (T,Th) Venue: WSL 5 Web Site: www.pbvusd.net/mis260 Instructor Name: Terrell Tucker Office: BDC 127
More informationChapter 5. Selection 5-1
Chapter 5 Selection 5-1 Selection (Decision) The second control logic structure is selection: Selection Choosing between two or more alternative actions. Selection statements alter the sequential flow
More informationASCII control characters (character code 0-31)
ASCII control characters (character code 0-31) DEC HEX 0 00 NUL Null char 1 01 SOH Start of Heading 2 02 STX Start of Text 3 03 ETX End of Text 4 04 EOT End of Transmission
More informationEssentials of Computer Programming. Computer Science Curriculum Framework
Essentials of Computer Programming Computer Science Curriculum Framework Course Title: Essentials of Computer Programming Course/Unit Credit: 1 Course Number: 460020 Teacher Licensure: Please refer to
More informationArrays. number: Motivation. Prof. Stewart Weiss. Software Design Lecture Notes Arrays
Motivation Suppose that we want a program that can read in a list of numbers and sort that list, or nd the largest value in that list. To be concrete about it, suppose we have 15 numbers to read in from
More informationJavaScript: Control Statements I
1 7 JavaScript: Control Statements I 7.1 Introduction 2 The techniques you will learn here are applicable to most high-level languages, including JavaScript 1 7.2 Algorithms 3 Any computable problem can
More informationEnter/Exit programming
P/N: MUL-53247-02 Enter/Exit programming (This barcode is also found at back cover page.) Framed values are default values. All Rights Reserved This guide is designed for advanced settings of Hand Free
More informationTalk 2008. Encoding Issues. An overview to understand and be able to handle encoding issues in a better way. Susanne Ebrecht
Talk 2008 Encoding Issues An overview to understand and be able to handle encoding issues in a better way Susanne Ebrecht PostgreSQL Usergroup Germany PostgreSQL European User Group PostgreSQL Project
More informationSystem.out.println("\nEnter Product Number 1-5 (0 to stop and view summary) :
Benjamin Michael Java Homework 3 10/31/2012 1) Sales.java Code // Sales.java // Program calculates sales, based on an input of product // number and quantity sold import java.util.scanner; public class
More informationDATA STRUCTURES USING C
DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give
More information