Trắc nghiệm lập trình C
|
|
- Gwen Lindsey
- 5 years ago
- Views:
Transcription
1 Title : Trắc nghiệm lập trình C Author : Vu Hong Viet Date : 07/09/2014 Các câu hỏi trắc nghiệm được thành viên diễn đàn vncoding sưu tập và biên soạn dựa trên quá trình học tập và kinh nghiệm thực tế. Chúng tôi đã chủ định biên soạn các câu hỏi trắc nghiệm bằng tiếng anh, vì đa số các đề thi trắc nghiệm lập trình vào các công ty phần mềm bằng tiếng anh. Đáp án được giải thích chi tiết tại diễn đàn: 1. Khái niệm cơ bản ngôn ngữ lập trình C 1. What is the correct value to return to the operating system upon the successful completion of a program? A. 0 B. -1 C. 1 D. Do not return a value 2. What is the only function all C programs must contain? A. start() B. system() C. main() D. program() 3. What punctuation is used to signal the beginning and end of code blocks? A. B. -> and <- C. BEGIN and END D. ( and ) 4. What punctuation ends most lines of C code? A.. B. ; C. : D. ' 5. Which of the following is a correct comment? A. */ Comments */ B. ** Comment ** C. /* Comment */ vncoding.net Page 1
2 D. Comment 6. Which of the following is not a correct variable type? A. float B. real C. int D. double 7. Which of the following is the correct operator to compare two variables? A. := B. = C. equal D. == 8. Which of the following is true? A. 1 B. 66 C..1 D. -1 E. All of the above 9. Which of the following is the boolean operator for logical-and? A. & B. && C. D. & 10. Evaluate!(1 &&!(0 1)) A. True B. False C. Unevaluatable 11. Which of the following shows the correct syntax for an if statement? A. if expression B. if expression C. if ( expression ) D. expression if 12. What is the final value of x when the code int x; for(x=0; x<10; x++) is run? A. 10 B. 9 C. 0 D When does the code block following while(x<100) execute? vncoding.net Page 2
3 A. When x is less than one hundred B. When x is greater than one hundred C. When x is equal to one hundred D. While it wishes 14. Which is not a loop structure? A. for B. do while C. while D. repeat until 15. How many times is a do while loop guaranteed to loop? A. 0 B. Infinitely C. 1 D. Variable 16. Which is not a proper prototype? A. int funct(char x, char y); B. double funct(char x) C. void funct(); D. char x(); 17. What is the return type of the function with prototype: "int func(char x, float v, double t);" A. char B. int C. float D. double 18. Which of the following is a valid function call (assuming the function exists)? A. funct; B. funct x, y; C. funct(); D. int funct(); 19. Which of the following is a complete function? A. int funct(); B. int funct(int x) return x=x+1; C. void funct(int) printf( "Hello" ); D. void funct(x) printf( "Hello" ); 20. Which follows the case statement? A. : B. ; C. - vncoding.net Page 3
4 D. A newline 21. What is required to avoid falling through from one case to the next? A. end; B. break; C. Stop; D. A semicolon. 22. What keyword covers unhandled possibilities? A. all B. contingency C. default D. other 23. What is the result of the following code? int x=0; switch(x) case 1: printf( "One" ); case 0: printf( "Zero" ); case 2: printf( "Hello World" ); A. One B. Zero C. Hello World D. ZeroHello World 24. Which of the following is the proper declaration of a pointer? A. int x; B. int &x; C. ptr x; D. int *x; 25. Which of the following gives the memory address of integer variable a? A. *a; B. a; C. &a; D. address(a); 26. Which of the following gives the memory address of a variable pointed to by pointer a? A. a; vncoding.net Page 4
5 B. *a; C. &a; D. address(a); 27. Which of the following gives the value stored at the address pointed to by pointer a? A. a; B. val(a); C. *a; D. &a; 28. Which of the following is the proper keyword or function to allocate memory in C? A. new B. malloc C. create D. value 29. Which of the following is the proper keyword or function to deallocate memory? A. free B. delete C. clear D. remove 30. Which of the following accesses a variable in structure b? A. b->var; B. b.var; C. b-var; D. b>var; 31. Which of the following accesses a variable in a pointer to a structure, *b? A. b->var; B. b.var; C. b-var; D. b>var; 32. Which of the following is a properly defined struct? A. struct int a; B. struct a_struct int a; C. struct a_struct int a; D. struct a_struct int a;; 33. Which properly declares a variable of struct foo? A. struct foo; B. struct foo var; C. foo; D. int foo; vncoding.net Page 5
6 34. Which of the following correctly declares an array? A. int anarray[10]; B. int anarray; C. anarray10; D. array anarray[10]; 35. What is the index number of the last element of an array with 29 elements? A. 29 B. 28 C. 0 D. Programmer-defined 36. Which of the following is a two-dimensional array? A. array anarray[20][20]; B. int anarray[20][20]; C. int array[20, 20]; D. char array[20]; 37. Which of the following correctly accesses the seventh element stored in foo, an array with 100 elements? A. foo[6]; B. foo[7]; C. foo(7); D. foo; 38. Which of the following gives the memory address of the first element in array foo, an array with 100 elements? A. foo[0]; B. foo; C. &foo; D. foo[1]; 39. Which of the following is a string literal? A. Static String B. "Static String" C. 'Static String' D. char string[100]; 40. What character ends all strings? A. '.' B. ' ' C. '\0' D. '/0' 41. Which of the following reads in a string named x with one hundred characters? vncoding.net Page 6
7 A. fgets(x, 101, stdin); B. fgets(x, 100, stdin); C. readline(x, 100, '\n'); D. read(x); 42. Which of the following functions compares two strings? A. compare(); B. stringcompare(); C. cmp(); D. strcmp(); 43. Which of the following adds one string to the end of another? A. append(); B. stringadd(); C. strcat(); D. stradd(); 2. Biến, toán tử và biểu thức toán học 1. What will be output when you will execute following c code? printf("%d\t",sizeof(6.5)); printf("%d\t",sizeof(90000)); printf("%d",sizeof('a')); return 0; Biết kích thước kiểu char : 1 byte, float : 4 byte, int : 4 byte, double : 8 byte, long : 4 byte. A B C D. Depend on complier 2. What will be output when you will execute following c code? double num=5.2; int var=5; printf("%d\t",sizeof(!num)); printf("%d\t",sizeof(var=15/2)); printf("%d",var); return 0; vncoding.net Page 7
8 A B C D. Another 3. What value gets printed by the program below? int w = 3; int x = 31; int y = 10; double z = x / y % w; printf("%f\n", z); A. 1 B. 0 C What will be output when you will execute following c code? char a=250; int expr; expr= a+!a + ~a + ++a; printf("%d",expr); return 0; A. - 6 B. 4 C. 5 D. Another 5. What will be output when you will execute following c code? int a=-5; unsigned int b=-5u; // (*) if(a==b) printf("avatar"); else printf("alien"); return 0; A. Avatar B. Alien C. Error at (*) vncoding.net Page 8
9 D. Another 6. What will be output when you will execute following c code? #include <stdio.h> #include <conio.h> int x = 3; printf("%d", x x); A. 7 B. 8 C. 9 D. Another 7. What output is? int i=5,j=6,k; k=i&j; printf("%d",k); A. 4 B. 0 C. 1 D What output is? int i=5,j=6; printf("%d", i j); A. 7 B. 6 C. 5 D Output of following code: vncoding.net Page 9
10 #include "conio.h" extern int x=0; x++; printf("%d",x); A. 0 B. Error C. 1 D. x isn't defined 10. Output of following code: extern int x=0; int x=1; printf("%d",x); A. 0 B. 1 C. Error Comlier 11. Output of following code: int y=0; int x=0; x++; ++y; printf("%d\t%d",x,y); A. 1 1 B. 1 0 C. 'x' undeclared identifier vncoding.net Page 10
11 12. Output of following code: int x; x++; printf("%d",x); A. 1 B. 0 C. Error 13. Output of following code: int x=0; int x=0,y=0; y++; x++; printf("%d",x); A. 1 B. Error C Output of following code: void count() static int page=0; printf("%d",page); page++; int i; for(i=0;i<10;i++) count(); vncoding.net Page 11
12 A B C Output of following code: const int x = 5; int x[x]; int y = sizeof(x) / sizeof(int); printf("%d",y); A. 1 B. 5 C. 20 D. 'x' isn't defined 16. What output is? int x=5,y=10,z=15; printf("%d %d %d"); return 0; A. Garbage Garbage Garbage B C D. Run time error 17. What output is? asm mov bx,8; mov cx,10 add bx,cx; printf("%d",_bx); return 0; vncoding.net Page 12
13 A. 18 B. 8 C. 0 D. Complie error 18. What output is? char *url="c:\tc\bin\rw.c"; printf("%s",url); return 0; A. c:\tc\bin\rw.c B. c:/tc/bin/rw.c C. c: c inw.c D. c:cinw.c E. w.c in 19. What output is? const int i=5; i++; printf("%d",i); return 0; A. 5 B. 6 C. 0 D. Complier error 20. What output is? #include<conio.h> char c=125; c=c+10; printf("%d",c); vncoding.net Page 13
14 A. 135 B. 8 C D What output is? #include<conio.h> char c=48; int i, mask=01; for(i=1; i<=5; i++) printf("%c", c mask); mask = mask<<1; A B. 1248@ C D What output is? #include<conio.h> float a = 0.7; if(0.7 > a) printf("hi\n"); else printf("hello\n"); A. Hi B. Hello C. None of above 3. Vòng lặp for, do..while 1. What value is returned by function func? vncoding.net Page 14
15 float func() int r = 0, d = 0, i=0; for (i; i < 2; i++) r += 5 / d; return r; A. 5 B. 0 C. Exception D. Another 2.What will be output when you will execute following c code? char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("%c%c%c%c\t",s[ i ],*(s+i),*(i+s),i[s]); A. mmmm aaaa nnnn B. mmm aaa nnn C. mmmm aaa nnn D. Another 3. What will be output when you will execute following c code? int i = 0; char ch = 'A'; do putchar (ch); while(i++ < 5 ++ch <= 'F'); A. AAAAAABCDEF B. AAAAAABCDE C. ABCDEF D. Another vncoding.net Page 15
16 4. What gets printed? int array[2][2] = 0, 1, 2, 3; int i; int sum = 0; for (i =0; i < 4; ++i) int x, y; x = i % 2; if (x) y = 0; else y = 1; sum += array[x][y]; printf("%d\n", sum); A. 4 B. 5 C. 6 D What output is? #include <stdio.h> #include <conio.h> int k; for (k = -3; k < -5; k++) printf("hello"); A. Hello B. Nothing C. Complier Error D. Run time error 6. What output is? vncoding.net Page 16
17 double k = 0; for (k = 0.0; k < 3.0; k++); printf("%lf", k); A. 012 B. Run time error C. 3 D What output is? #include <stdio.h> int i = 0; for (; ; ;) printf("in for loop\n"); printf("after loop\n"); A. Complie time error B. Infinite Loop C. Nothing 8. What output is? #include <conio.h> #include <stdio.h> int foo(); int i = 0; for (foo(); i == 1; i = 2) printf("in for loop\n"); printf("after loop\n"); int foo() return 1; A. In for loop B. After loop C. Complie error vncoding.net Page 17
18 9. What output is? #include <conio.h> #include <stdio.h> int i = 0; while (i = 0) printf("true\n"); printf("false\n"); A. True B. False C. Complie Error D. Another 10. What output is? #include <conio.h> #include <stdio.h> int i = 0, j = 0; while (i < 5, j < 10) i++; j++; printf("%d, %d\n", i, j); A. 5, 5 B. 10, 10 C. Syntax error 11. What output is? #include <conio.h> #include <stdio.h> int a = 0, i = 0, b = 0 ; for (i = 0;i < 5; i++) a++; vncoding.net Page 18
19 continue; b++; printf("\n a = %d,b =%d",a,b); A. a = 5,b = 5 B. a = 4,b = 4 C. a = 5,b = 0 D. Another 12. What output is? int i = 0; for (i = 0;i < 5; i++) if (i < 4) printf("hello"); break; A. Hello B. Hello is printed 3 times C. Hello is prined 4 times D. Hello is printed 5 times 13. What output is? #include<conio.h> int i=0; for(;i<=2;) printf(" %d",++i); A B C What output is? vncoding.net Page 19
20 #include<conio.h> int x; for(x=1;x<=5;x++); printf("%d",x); A B C. 6 D What output is? #include <stdio.h> #include <conio.h> int i = 3; while (i--) int i = 100; i--; printf("%d ", i); A B. Complier Error C How many times will "vncoding" is printed on screen? #include <stdio.h> #include <conio.h> int i = 1024; for (; i; i >>= 1) printf("\nvncoding"); A. 10 B. 11 vncoding.net Page 20
21 C. Infinite 17. What output is? #include <conio.h> int i=2,j=2; while(i+1?--i:j++) printf("%d",i); A. 1 B. 2 C. Complier Error 18. What output is? #include <conio.h> int i,j; i=j=2; while(--i&&j++) printf("%d %d",i,j); A. 1 3 B. 1 2 C. Không in ra kí tự nào 19. What output is? #include <conio.h> int x=011,i; for(i=0;i<x;i+=3) printf("start "); continue; printf("end"); vncoding.net Page 21
22 A. Start End Start End B. Start Start Start C. Start Start Start Start 4. If/else, switch( ) case, goto 1. What gets printed? int i = 3; if (!i) i++; i++; if (i==3) i+=2; i+=2; printf("%d\n", i); A. 7 B. 5 C. 6 D. Another 2. What gets printed? int x; if(x=0) printf ("Value of x is 0"); else printf ("Value of x is not 0"); A. Value of x is 0 B. Value of x is not 0 C. Error 3. What gets printed? vncoding.net Page 22
23 int i; for(i=0;i<20;i++) switch(i) case 0:i+=5; case 1:i+=2; case 5:i+=5; default: i+=4; break; printf("%d,",i); A. 14,18, B. 16,20, C. 16,21, 4. What gets printed? static int i; while(i<=10&&i>=0) (i>2? i++:i--); printf("%d",i); A. -1 B. 0 C. Complier error 5. What output is? int i=10,j=20; if(i=20) printf(" Hello"); else printf(" Hi"); A. Hello B. Hi vncoding.net Page 23
24 C. Complier error 6. What output is? int x=0,y=0; if(x==0 ++y) printf(" x=%d",x); printf(" y=%d",y); A. x=0 y=1 B. x=0 y=0 C. Error syntax 7. What output is? int i = 5, k; if (i == 0) goto label; label: printf("%d", i); printf("hey"); A. Hey B. 5 C. 5Hey D. Complie error 8. What output is? printf("%d ", 1); goto l1; printf("%d ", 2); l1:goto l2; printf("%d ", 3); l2:printf("%d ", 4); A. 1 4 B vncoding.net Page 24
25 C. Syntax error D. Another 9. What output is? #include <conio.h> #include <stdio.h> void foo(); printf("%d ", 1); goto l1; printf("%d ", 2); void foo() l1: printf("3 "); A. Complie error B. 3 C. 1 D What output is? #include <conio.h> #include <stdio.h> int i = 0, j = 0; while (i < 2) l1: i++; while (j < 3) printf("loop\n"); goto l1; A. loop loop loop B. Infinite loop C. Complie error 11. What output is? vncoding.net Page 25
26 int i = 0, j = 0; while (l1: i < 2) i++; while (j < 3) printf("loop\n"); goto l1; A. loop loop B. loop loop loop loop C. Complie error D. Another 12. What output is? int a=15,b=10,c=5; if(a>b>c ) printf("true"); else printf("false"); A. True B. False C. Complier Error D. Run time error 13. What output is? #include <stdio.h> #include <conio.h> int i = 0; switch (i) case '0': printf("a"); break; case '1': printf("b"); vncoding.net Page 26
27 break; default: printf("abc"); A. A B. B C. ABC 14. What output is? #include <stdio.h> #include "conio.h" int i = 3; switch (i) case 0+1: printf("a"); break; case 1+2: printf("b"); break; default: printf("abc"); A. A B. B C. ABC 15. What output is? #include <stdio.h> #include <conio.h> #define A 0 #define B 1 int i = 3; switch (i & 1) case A: printf("false"); break; case B: printf("true"); break; default: printf("default"); vncoding.net Page 27
28 A. FALSE B. TRUE C. Default 16. What output is? #include <stdio.h> #include <conio.h> int i; if (printf("0")) i = 3; else i = 5; printf("%d", i); A. 3 B. 5 C. 03 D What output is? #include <conio.h> int a = 5; switch(a) default: a = 4; case 6: a--; case 5: a = a+1; case 1: a = a-1; printf("%d \n", a); A. 5 B. 4 vncoding.net Page 28
29 C What output is? #include <stdio.h> #include <conio.h> int x = 3; if (x == 2); x = 0; if (x == 3) x++; else x += 2; printf("x = %d", x); A. x = 2 B. x = 6 C. x = What output is? #include <stdio.h> #include <conio.h> int check = 20, arr[] = 10, 20, 30; switch (check) case arr[0]: printf("a "); case arr[1]: printf("b"); case arr[2]: printf("c"); A. ABC B. BC C. B D. Complier Error 5. Con trỏ,mảng,string 1. What output is? void myfunc(char** param) vncoding.net Page 29
30 ++param; char* string = (char*)malloc(64); strcpy(string, "hello_world"); myfunc(&string); myfunc(&string); printf("%s\n", string); A. hello_world B. ello_world C. llo_world D. lo_world 2. What is output? void myfunc(char** param) ++*param; char* string = (char*)malloc(64); strcpy(string, "hello_world"); myfunc(&string); myfunc(&string); printf("%s\n", string); A. hello_world B. ello_world C. llo_world D. lo_world 3. What is output? int ints[] = 0, 1, 2, 3 ; int* i1 = ints + 1; int a = ++*i1; int b = a + *i1; printf("%d\n", b); vncoding.net Page 30
31 A. 4 B. 3 C What output is? int ints[] = 0, 5, 10, 15 ; int* i2 = ints + 2; int a = *i2++; // <=> a = *(i2++); printf("%d#%d\n", a, *i2); A. 10#15 B. 10#10 C. 15#15 D. 11#15 5. What output is? int ints[] = 0, 5, 10, 15 ; int* i2 = ints + 2; int a = *++i2; // <=> a = *(++i2); printf("%d#%d\n", a, *i2); A. 10#15 B. 10#10 C. 15#15 D. 11#15 6. What is output? int ints[] = 0, 1, 2, 3 ; int* i1 = ints + 1; int* i2 = ints + 2; int a = ++*i1 + *i2++; int b = *++i1 + *i2--; printf("%d#%d", a, b); vncoding.net Page 31
32 A. 4#4 B. 4#5 C. 5#6 D. 4#6 7. What output is? int i=400; int *ptr=&i; *++ptr=2; printf("%d %d",i,*ptr); A B C D. Complier error 8. What output is? char str[]="pvpit"; char *s1=str; s1++; printf("%c",*s1); A. pvpit B. vpit C. v D. Another 9. What output is? char *s="\12345s\n"; printf("%d",strlen(s)); printf("\n%s",s); vncoding.net Page 32
33 A. 5 B. 7 C. 9 D For the code below which lines should be reported as errors by a compiler? int main(int argc, char** argv) const char* foo = "wow"; // line 1 foo = "top"; // line 2 foo[0] = 1; // line 3 return 0; A. 1 B. 2 C. 3 D. None of the lines 11. What output is? int x = 5,y = 6; int* const p=&x; p = &y; printf("%d",(*p)); A. Complier error B. 6 C. 5 D. Another 12. What output is? int x = 5,y = 8; const int* p; p = &x; p = &y; x++; printf("%d",*p); vncoding.net Page 33
34 A. 5 B. 6 C. 8 D. Complier Error 13. What output is? int x = 5; const int* p; p = &x; x++; *p = 4; printf("%d",*p); A. 5 B. 6 C. 4 D. Complier Error 14. What will be output of following program? int a = 320; char *ptr; ptr =( char *)&a; printf("%d ",*ptr); return 0; A. 320 B. 64 C. Complier Error 15. What will be output of following program? int i = 3; int *j; int **k; vncoding.net Page 34
35 j=&i; k=&j; printf("%u, %u, %d ",k,*k,**k); return 0; A. Address of j, Address of i, 3 B. Complier Error C. 3, 3, What will be output of following program? #include<conio.h> #include<string.h> char *ptr1 = NULL; char *ptr2 = 0; printf("\n%d",ptr2); strcpy(ptr1," c"); strcpy(ptr2,"questions"); printf("\n%s %s",ptr1,ptr2); 17. What will be output of following program? #include<conio.h> int a = 10; void *p = &a; int *ptr = p; printf("%u\n",*ptr); 18. What will be output of following program? #include<conio.h> int a = 5,b = 10,c; vncoding.net Page 35
36 int *p = &a,*q = &b; c = p - q; printf("%d", c); Answer: 19. What will be output of following program? #include<conio.h> int i = 5, j; int *p, *q; p = &i; q = &j; j = 5; printf("%d %d",*p,*q); A. 5 5 B. Complier Error C. 5 Garbage value 20. What will be output of following program? #include<conio.h> int i = 5; int *p; p = &i; printf(" %u %u", *&p, &*p); A. Address of i Address of i B. Garbage value Garbage value C. Complier Error 6. Con trỏ, mảng, string (tiếp) 21. What output is? vncoding.net Page 36
37 #include<conio.h> int array[2][2][3]=0,1,2,3,4,5,6,7,8,9,10,11; printf("%d",array[1][0][2]); A. 6 B. 7 C. 8 D What output is? #include<conio.h> char arr[8]='v','i','e','t','n','a','m'; char *p; p=(char *)(arr+2)[2]; printf("%c",p); A. I B. E C. M D. N 23. What will be output of following program? #include "stdio.h" #include "conio.h" char ch[]='0','1','2','3','4','5','6','7','8','9'; int *p=(int*)ch; p++; printf("%x",*p); (Giả sử: kiến trúc máy tính sử dụng là little endian) A B C vncoding.net Page 37
38 24. What output is? #include<conio.h> int i=11; int const * p=&i; p++; printf("%d",*p); A. 11 B. 12 C. Garbage value D. Complier error 25. Which of the following statements are correct about an array? 1. The array int num[26]; can store 26 elements 2. The expression num[1] designates the very first element in the array 3. It is necessary to initialize the array at the time of declaration. 4. The declaration num[size] is allowed if SIZE is a macro. A. 1,4 B. 3 C. 1,2 D The library function used to find the last occurrence of a character in a string is A. strnstr() B. strrchr() C. laststr() D. strstr() 27. What output is? (assuming that the array begins at the location 1002 and size of an integer is 4 bytes) #include<conio.h> int a[3][4] = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ; printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1)); vncoding.net Page 38
39 A. 1006, 2, 2 B. 1006, 4, 4 C. 1002, 5, 5 D. Error 28. What does the following declaration mean? int (*ptr)[10]; A. ptr is array of pointers to 10 integers B. ptr is a pointer to an array of 10 integers C. ptr is an array of 10 integers D. ptr is an pointer to array 29. What output is? #include<conio.h> char str[] = "VNCODING\0\.NET\0"; printf("%s\n", str); A. VNCODING B. VNCODING\0\.NET\0 C. VNCODING\0\.NET 30. What output is? #include<conio.h> void swap(char *, char *); char *pstr[2] = "VNCODING", ".NET"; swap(pstr[0], pstr[1]); printf("%s%s", pstr[0], pstr[1]); void swap(char *t1, char *t2) char *t; t=t1; t1=t2; t2=t; vncoding.net Page 39
40 A. VNCODING.NET B..NETVNCODING C. Address of pstr[0] Address of pstr[1] 31. What output is? #include<conio.h> void swap(char **, char **); char *pstr[2] = "VNCODING", ".NET"; swap(&pstr[0], &pstr[1]); printf("%s%s", pstr[0], pstr[1]); void swap(char **t1, char **t2) char *t; t=*t1; *t1=*t2; *t2=t; A. VNCODING.NET B..NETVNCODING C. Address of pstr[0] Address of pstr[1] 7. Struct,union,enum 1. What output of code is? #include "stdio.h" #include "conio.h" typedef struct char c; // 1 byte float b; // 4 byte int a; // 4 byte A; printf("\n Size of struct: %d",sizeof(a)); Giả sử dùng VC trên hệ điều hành 32 bit A. 9 vncoding.net Page 40
41 B. 12 C. 16 D What output of code is? #include "stdio.h" #include "conio.h" typedef struct int a[2]; // 8 byte char b[5]; // 5 byte char c[5]; // 5 byte A; printf("\n Size of struct: %d",sizeof(a)); A. 20 B. 18 C. 32 D What output of the following code is? #include "stdio.h" #include "conio.h" struct birthday int d; // day int m; // month int y; // year ; struct info int ID; // code of staff birthday b; ; info a = 1009,16,9,1989; printf("\nid=%d, dd/mm/yyyy = %d/%d/%d",a.id,a.b.d,a.b.m,a.b.y); vncoding.net Page 41
42 A. ID=1009, dd/mm/yyyy = 16/09/1989 B. ID = 1009, dd/mm/yyyy = garbage value/garbage value/garbage value (garbage value: giá trị rác) C. Error sytax (Lỗi cú pháp) 8. Macro 1. What output is? #include<conio.h> #define x 5+2 int i; i=x*x*x; printf("%d",i); A. 21 B. 27 C. Complier Error D. Another 2. What output is? #include<conio.h> #define call(x,y) x##y int x=5,y=10,xy=20; printf("%d",xy+call(x,y)); A. 530 B. 70 C. 40 D. Complier Error vncoding.net Page 42
COP 3223 Introduction to Programming with C - Study Union - Fall 2017
COP 3223 Introduction to Programming with C - Study Union - Fall 2017 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................
More informationBộ môn HTMT&TT, Khoa Công Nghệ Thông Tin và TT, ĐH Cần Thơ
RPC và RMI Khái niệm RPC Khái niệm RMI Các bước cài đặt RMI trong Java Ví dụ về RMI 1 RPC (Remote Procedure Call) Khái niệm RPC: gọi thủ tục ở xa. Trong suốt về mặt ngữ nghĩa: gọi thủ tục ở xa cũng có
More informationCOP 3223 Introduction to Programming with C - Study Union - Spring 2018
COP 3223 Introduction to Programming with C - Study Union - Spring 2018 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................
More informationSample Question Set For Coding and Debugging
Sample Question Set For Coding and Debugging 1.What will be the output of the following statements? int i = 1,j; int i = 1,j; j=i--- -2; printf("%d",j); a) error b) 2 c) 3 d) -3 2. What will be the output
More informationBộ môn MMT&TT, Khoa Công Nghệ Thông Tin và TT, ĐH Cần Thơ
Giới thiệu Lập trình mạng Truyền thông Cơ chế giao tiếp liên quá trình (IPC) Mô hình OSI Mạng TCP/IP Dịch vụ mạng Mô hình Client/Server Các kiểu kiến trúc chương trình 1 Truyền thông Là sự giao tiếp, trao
More informationHƯỚNG DẪN CÀI ĐẶT PHẦN MỀM DIỆT VIRUS AVIRA
HƯỚNG DẪN CÀI ĐẶT PHẦN MỀM DIỆT VIRUS AVIRA A V I R A A N T O À N H Ơ N Trang 1 Mục lục 1. Trước khi cài đặt... 3 1.1 Kiểm tra khả năng đáp ứng của hệ thống:... 3 1.2 Hướng dẫn nâng cấp:... 3 1.3 Hướng
More informationCOP 3223 Introduction to Programming with C - Study Union - Fall 2017
COP 3223 Introduction to Programming with C - Study Union - Fall 2017 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................
More information2. Which of the following will print the value 2 for the above code?
Computers are good at following instructions, but not at reading your mind. - Donald Knuth IMPORTANT QUESTIONS ON C LANGUAGE 1. What is the output of this program? char *ptr; char string[] = "How are you?";
More informationBài 7: Các cấu trúc điều khiển
KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN CÔNG NGHỆ PHẦN MỀM Bài 7: Bài giảng LẬP TRÌNH CƠ BẢN Nội dung Tìm hiểu về cấu trúc lựa chọn Lệnh if Lệnh if else Lệnh nhiều if Lệnh if lồng nhau Lệnh switch 2 Nội dung Tìm
More informationHƯỚNG DẪN SỬ DỤNG HỆ THỐNG CẬP NHẬT CHỨNG THƯ SỐ HOTLINE:
HƯỚNG DẪN SỬ DỤNG HỆ THỐNG CẬP NHẬT CHỨNG THƯ SỐ HOTLINE: 19006276 Ngày phát hành : 03/08/2017 Nơi phát hành : Công ty CP Chữ ký số Vi Na Phiên bản : 2.0 1 Mục lục 1 Các thuật ngữ viết tắt... 3 2 Môi trường
More informationKhối: Cao Đẳng nghề và Trung Cấp Năm 2009
Hướng Dẫn Thực Hành Lập Trình Windows Khối: Cao Đẳng nghề và Trung Cấp Năm 2009 Hướng dẫn: Bài tập thực hành được chia làm nhiều Module Mỗi Module được thiết kế cho thời lượng là 3 tiết thực hành tại lớp
More informationC Multiple Choice Questions and answers MCQ with Ans.
C Multiple Choice Questions and answers MCQ with Ans. 1. Who is father of C Language? A. Bjarne Stroustrup B. Dennis Ritchie C. James A. Gosling D. Dr. E.F. Codd Answer : B 2. C Language developed at?
More informationTài liệu hướng dẫn: Stored Procedure
1 Tài liệu hướng dẫn: Stored Procedure Tài liệu hướng dẫn: Stored Procedure Người thực hiện Hoàng Anh Tú Nội dung 1 Giới thiệu... 2 2 Stored Procedure cơ bản... 2 2.1 Tạo Stored Procedure... 3 2.1.1 Tạo
More informationChương 5. Network Layer 19/09/2016 1
Chương 5 Network Layer 19/09/2016 1 Nội dung Địa chỉ IPv4 Địa chỉ IPv6 Internetworking Giao thức Internet (IP) Chuyển đổi từ IPv4 sang IPv6 19/09/2016 2 Địa chỉ IPv4 Là địa chỉ 32 bit duy nhất, nhận diện
More informationĐỌC, GHI XML VỚI C# TRONG ADO.NET --- SỬ DỤNG VISUAL STUDIO
TRUNG TÂM TIN HỌC ĐẠI HỌC KHOA HỌC TỰ NHIÊN-TP.HCM ĐỌC, GHI XML VỚI C# TRONG ADO.NET --- SỬ DỤNG VISUAL STUDIO 2010 --- 1 TRUNG TÂM TIN HỌC ĐẠI HỌC KHOA HỌC TỰ NHIÊN-TP.HCM Nội dung 1. Tổng quan về v XML
More informationPhần 2. SỬ DỤNG POWERPOINT ĐỂ CHUẨN BỊ NỘI DUNG TRÌNH BÀY
Phần 2. SỬ DỤNG POWERPOINT ĐỂ CHUẨN BỊ NỘI DUNG TRÌNH BÀY NỘI DUNG (1) 1. Giới thiệu PowerPoint và ứng dụng trong dạy học Mục đích sử dụng Các tính năng chung Một số kỹ năng thuyết trình sử dụng PP 2.
More information80 Minutes CENG 230 MidtermExam :40
80 Minutes CENG 230 MidtermExam 02.12.2014 17:40 There are 40 questions (each 2.5 points) for a total of 100 points. Exam Type: A All questions are multiple choice, no points will be lost for wrong answers.
More informationHigh Performance Programming Programming in C part 1
High Performance Programming Programming in C part 1 Anastasia Kruchinina Uppsala University, Sweden April 18, 2017 HPP 1 / 53 C is designed on a way to provide a full control of the computer. C is the
More informationĐa ngôn ngữ (Internationalization) trong Servlet
Đa ngôn ngữ (Internationalization) trong Servlet Trước khi vào bài, chúng tôi giải thích 3 khái niệm quan trọng: Internationalization (i18n): Nghĩa là kích hoạt một trang có khả năng cung cấp nhiều phiên
More informationTỔNG QUAN VỀ.NET VÀ C#
TỔNG QUAN VỀ.NET VÀ C# PHAN TRỌNG TIẾN BM Công nghệ phần mềm Khoa Công nghệ thông tin, VNUA Email: phantien84@gmail.com Website: http://timoday.edu.vn 7/5/16 Tổng quan về.net và C# 1 Giới thiệu q.net là
More informationNội dung chính của chương. Các công nghệ đĩa cứng Cấu tạo vật lý của đĩa cứng Cấu tạo logic của đĩa cứng Cài đặt đĩa cứng như thế nào?
Chương 6 Đĩa cứng Nội dung chính của chương Các công nghệ đĩa cứng Cấu tạo vật lý của đĩa cứng Cấu tạo logic của đĩa cứng Cài đặt đĩa cứng như thế nào? Công nghệ đĩa cứng Đĩa cứng đọc/ghi dữ liệu như thế
More informationMô hình dữ liệu quan hệ (Relational data model)
Mô hình dữ liệu quan hệ (Relational data model) 1 Nội dung 1. Mô hình dữ liệu quan hệ (Relational data model) 2. Phép toán tập hợp (Set Operation) 3. Phép toán đại số quan hệ (Relational Algebra Operation)
More informationGiáo trình này được biên dịch theo sách hướng dẫn của Sun Light. Vì là hướng dẫn kỹ thuật, trong này những thuật ngữ kỹ thuật bằng tiếng Anh tôi chỉ
Giáo trình này được biên dịch theo sách hướng dẫn của Sun Light. Vì là hướng dẫn kỹ thuật, trong này những thuật ngữ kỹ thuật bằng tiếng Anh tôi chỉ dịch một lần cho các bạn hiểu nghĩa. Những từ đó, về
More informationHƯỚNG DẪN SỬ DỤNG PLESK PANEL
HƯỚNG DẪN SỬ DỤNG PLESK PANEL Trang 1 I. HƯỚNG DẪN ĐĂNG NHẬP 1. Đăng nhập hệ thống Plesk: Để đăng nhập vào hệt thống plesk panel thực hiện các bước sau(hình 1): - Trên trình duyệt web gõ vào địa chỉ: https://ip:8443
More informationM1-R4: Programing and Problem Solving using C (JAN 2019)
M1-R4: Programing and Problem Solving using C (JAN 2019) Max Marks: 100 M1-R4-07-18 DURATION: 03 Hrs 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter
More informationSTACK và QUEUE. Lấy STACK
MỤC TIÊU STACK và QUEUE Hoàn tất phần thực hành này, sinh viên có thể: - Hiểu được cách thức sử dụng stack và queue trên cơ sở sử dụng danh sách liên kết để cài đặt. - Hiểu và vận dụng các cấu trúc stack
More informationProgramming I Assignment 04. Branching I. # Student ID Student Name Grade (10) -
Programming I Assignment 04 Branching I # Student ID Student Name Grade (10) - Delivery Date 1. يتم تسليم التمرين محلوال في خالل أسبوعا من تاريخ التمرين و يتم حذف درجتين من التمرين عن كل أسبوع تأخير 2.
More informationRicardo Rocha. Department of Computer Science Faculty of Sciences University of Porto
Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Adapted from the slides Revisões sobre Programação em C, Sérgio Crisóstomo Compilation #include int main()
More informationFundamental of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 9 Pointer Department of Computer Engineering 1/46 Outline Defining and using Pointers
More informationGroup of Institutions Test Paper: Technical (Set-4) T&P Department } (A) 0 (B) 25 (C) 1 (D) -1 (E) 2. } (A) Sachin (B) Rahul
1. Predict Output? int a=0; #if (a==0) printf("equal"); #else if printf("not equal"); #endif (A) (B) (C) (D) Equal Not equal Null Garbage 2. What will be output if you will execute following c code? for(;null;)
More informationOnline Appointment System will work better with below conditions/ Hệ thống đặt hẹn online sẽ hoạt động tốt hơn với điều kiện sau đây:
Online Appointment Link/ Link đặt hẹn online: http://www.vfsglobal.com/netherlands/vietnam/schedule-an- Appointment.html ( Using for applicants who wish to apply for The Netherlands visas at VFS Netherlands
More informationFinal Intro to C Review
Final Exam Content: Final Intro to C Review - Pass by reference Functions - General Syntax - Structures - Recursion(maybe?) - Programming by nature is cumulative so any past material is up for grabs as
More informationBELGIUM ONLINE APPOINTMENT
BELGIUM ONLINE APPOINTMENT Online Appointment Link/ Link đặt hẹn online: http://www.vfsglobal.com/belgium/vietnam/vietnamese/schedule-anappointment.html Using for applicants who wish to apply for Belgium
More informationMemory Allocation. General Questions
General Questions 1 Memory Allocation 1. Which header file should be included to use functions like malloc() and calloc()? A. memory.h B. stdlib.h C. string.h D. dos.h 2. What function should be used to
More informationCẤU TRÚC DỮ LIỆU NÂNG CAO
CẤU TRÚC DỮ LIỆU NÂNG CAO Các kiến thức yêu cầu Tóm tắt nội dung môn học Phương pháp kiểm tra đánh giá Tài liệu tham khảo 1 Các kiến thức yêu cầu Các thuật toán và cấu trúc dữ liệu cơ bản Ngôn ngữ lập
More informationHƯỚNG DẪN CÁCH SỬ DỤNG WINDOWS MOVIE MAKER
HƯỚNG DẪN CÁCH SỬ DỤNG WINDOWS MOVIE MAKER Tiện ích của phần mềm Windows Movie Maker: Tạo Slide show trình chiếu ảnh. Tăng giảm độ sáng tối cho ảnh. Hiệu ứng chuyển ảnh. Chèn âm thanh và chỉnh sửa. Chèn
More informationKhoa KH & KTMT Bộ môn Kỹ Thuật Máy Tính
dce Khoa KH & KTMT Bộ môn Kỹ Thuật Máy Tính, CE Department dce Tài liệu tham khảo Digital Systems, Principles and Applications, 8 th /5 th Edition, R.J. Tocci, Prentice Hall Digital Logic Design Principles,
More informationBUILDING A VIETNAMESE DIALOG MECHANISM FOR V-DLG~TABL SYSTEM
BUILDING A VIETNAMESE DIALOG MECHANISM FOR V-DLG~TABL SYSTEM An Hoai Vo and Dang Tuan Nguyen Faculty of Computer Science, University of Information Technology, Vietnam National University Ho Chi Minh City
More informationQ 1. Attempt any TEN of the following:
Subject Code: 17212 Model Answer Page No: 1 / 26 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The
More informationWeek 1 Questions Question Options Answer & Explanation A. 10 B. 20 C. 21 D. 11. A. 97 B. 98 C. 99 D. a
Sr. no. Week 1 Questions Question Options Answer & Explanation 1 Find the output: int x=10; int y; y=x++; printf("%d",x); A. 10 B. 20 C. 21 D. 11 Answer: D x++ increments the value to 11. So printf statement
More informationArrays. Example: Run the below program, it will crash in Windows (TurboC Compiler)
1 Arrays General Questions 1. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? A. The element will be set to 0. B. The compiler would
More informationS.Purushothaman M.Sc.,B.Ed. WhatsApp
1 S.Purushothaman M.Sc.,B.Ed. WhatsApp-9944041212 2 Table Of content Basics of C Language 1. Overview of C 2. Features of C 3. My First C program 4. C Input / Output 5. C Syntax Rules 6. Keywords and Identifier
More informationHuawei Test 5. Explanation: P.W. of Rs. 12,880 due 8 months hence=rs. [ (12880*100)/(100+(18*(8/12)))]
Huawei Test 5 1 A man wants to sell his scooter. There are two offers, one at Rs. 12,000 cash and the other a credit of Rs. 12,880 to be paid after 8 months, money being at 18% per annum. Which is the
More informationSasken Technical Questions
Sasken Technical Questions 1. main() int a = 10,*j; void *k; j = k =&a; j++; k++; printf("\n %u %u",j,k); A.compiler error B.syntax error C.memory address D.no output Explanation: cannot increment a void
More informationC Programming Multiple. Choice
C Programming Multiple Choice Questions 1.) Developer of C language is. a.) Dennis Richie c.) Bill Gates b.) Ken Thompson d.) Peter Norton 2.) C language developed in. a.) 1970 c.) 1976 b.) 1972 d.) 1980
More informationBÀI TẬP THỰC HÀNH LẬP TRÌNH WINDOWS C#
BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC SƯ PHẠM TP.HCM KHOA CÔNG NGHỆ THÔNG TIN http://www.hcmup.edu.vn BÀI TẬP THỰC HÀNH LẬP TRÌNH WINDOWS C# Phần 1: Làm quen với ứng dụng Form 1. Bài tập mở đầu 1.1. Khởi
More informationTình huống 1: PPPoE với Username và Password
HƯỚNG DẪN CẤU HÌNH NHANH INTERNET (Vigor2912 / Vigor2925) Tình huống 1: PPPoE với Username và Password - CTY có một đường truyền cáp quang. - Nhà mạng đã cho mượn Converter quang và router - Router đó
More informationMạng máy tính - Computer Network: Hệ. Giao thức - Protocol:
CÔNG NGHỆ WEB VÀ ỨNG DỤNG Giới i thiệu chung Nội dung Nhắc lại một số khái niệm Phân loại trang web Một số bước chính trong phát triển website Công bố website trên internet Xác định cấu trúc website 3
More informationChương 5. Network Layer. Phần 1 - Địa chỉ IPv4. Tài liệu : Forouzan, Data Communication and Networking
Chương 5 Network Layer Phần 1 - Địa chỉ IPv4 Tài liệu : Forouzan, Data Communication and Networking 1 Nội dung Địa chỉ IPv4 Internetworking Giao thức Internet (IP) Địa chỉ IPv6 2 Chức năng tầng Network
More informationSIEMENS INDUSTRIAL NETWORKS
SIEMENS INDUSTRIAL NETWORKS 1 ASI NETWORK INTRODUCTION Number of slaves Up to 62 Number of I/Os Up to 496 inputs and 496 outputs Medium Line length Cycle time Data transfer Unshielded two-wire line for
More informationTÀI LIỆU THỰC HÀNH MÔN CƠ SỞ DỮ LIỆU NÂNG CAO
TÀI LIỆU THỰC HÀNH MÔN CƠ SỞ DỮ LIỆU NÂNG CAO Mục lục Index...2 Tài liệu tham khảo...2 Công cụ...2 Nội dung...2 Cú pháp tạo index...2 Cú pháp chỉnh sửa index...2 Áp đặt tính duy nhất trên cột không khóa...3
More informationBÀI 1: VBA LÀ GÌ? TẠO MACRO, ỨNG DỤNG CÁC HÀM TỰ TẠO (UDF), CÀI ĐẶT ADD-INS VBA là gì?
BÀI 1: VBA LÀ GÌ? TẠO MACRO, ỨNG DỤNG CÁC HÀM TỰ TẠO (UDF), CÀI ĐẶT ADD-INS VBA là gì? Nguyễn Duy Tuân: 0904.210.337 1/12 Macro là gì? Macro là một lệnh lệnh thực thi một hay nhiều thao tác người dùng
More informationHỢP ĐỒNG MUA BÁN HÀNG HÓA QUỐC TẾ GV: NGUYỄN THỊ BÍCH PHƯỢNG
HỢP ĐỒNG MUA BÁN HÀNG HÓA QUỐC TẾ GV: NGUYỄN THỊ BÍCH PHƯỢNG KHÁI NIỆM & PHÂN LOẠI Hợp đồng mua bán hàng hóa quốc tế: còn được gọi là hợp đồng xuất nhập khẩu, hoặc hợp đồng mua bán ngoại thương là sự thỏa
More informationHTML DOM - Forms. MSc. nguyenhominhduc
HTML DOM - Forms MSc. nguyenhominhduc Đối tượng form Form là một thành phần dùng để thu thập dữ liệu, thông tin từ người dùng. Mỗi phần tử trong form là một đối tượng trong DOM. Do đó mỗi phần tử trên
More informationBài 13: C++11. EE3490: Kỹ thuật lập trình HK1 2017/2018 TS. Đào Trung Kiên ĐH Bách khoa Hà Nội
Bài 13: C++11 1 Các phiên bản C++ C++98 (đã học trong các bài trước): Được ISO chuẩn hoá lần đầu tiên C++03: Một số thay đổi nhỏ C++0x / C++11: Rất nhiều cập nhật mới Nhiều tính năng được lấy lại từ thư
More informationCài đặt và cấu hình StarWind iscsi trên Windows. iscsi SAN là gì?
iscsi SAN là gì? iscsi là Internet SCSI ( Small Computer System Interface ) là một chuẩn công nghiệp phát triển để cho phép truyền tải các lệnh SCSI qua mạng IP hiện có bằng cách sử dụng giao thức TCP/IP.
More informationKIẾN TRÚC MÁY TÍNH. Giảng viên: ThS. Phan Thanh Toàn. v
KIẾN TRÚC MÁY TÍNH Giảng viên: ThS. Phan Thanh Toàn 1 BÀI 4 CẤU TRÚCBUS TRONG MÁY VI TÍNH Giảng viên: ThS. Phan Thanh Toàn 2 MỤC TIÊU BÀI HỌC Liệt kêđược cácloại bus trong hệ thống. Mô tảđược các bus cơ
More informationChương 7. Application Layer. Tài liệu : Forouzan, Data Communication and Networking
Chương 7 Application Layer Tài liệu : Forouzan, Data Communication and Networking 1 Các ứng dụng mạng Network Applications Là những chương trình chạy trên những đầu cuối khác nhau, giao tiếp với nhau thông
More information2. C99 standard guarantees uniqueness of characters for internal names. A. 12 B. 26 C. 31 D. 48
1. How can you make an infinite loop in C? A. while(1) { } B. loop:... goto loop; C. for(;;) { } D. All answers are right 2. C99 standard guarantees uniqueness of characters for internal names. A. 12 B.
More informationLAB IP SLA Bài 1. Bùi Quốc Kỳ ***
LAB IP SLA Bài 1 Bùi Quốc Kỳ *** Yêu cầu: 1. Cấu hình cơ bản trên các thiết bị. 2. Routing: Cấu hình định tuyến tĩnh Static Route trên các thiết bị đảm bảo mạng hội tụ. 3. PAT: Cấu hình PAT (NAT Overload)
More informationLab01: M V C Lưu ý: Để thực hành, các bạn phải cài Visual Studio 2013 trở lên mới hỗ trợ MVC5.
Lab01: M V C Lưu ý: Để thực hành, các bạn phải cài Visual Studio 2013 trở lên mới hỗ trợ MVC5. 1 Mục đích Giới thiệu mô hình MVC Model, Controller, View Phân biệt ViewData, ViewBag, TempData 2 Khởi động
More informationI. Hướng Dẫn Đăng Nhập:
I. Hướng Dẫn Đăng Nhập: 1. Đăng nhập hệ thống Plesk: Để đăng nhập hệ thống thực hiện các bước sau: Bước 1: Trên trình duyệt web gõ địa chỉ http://hosting04.viettelidc.com.vn hoặc địa chỉ https://sww01.viettelidc.com.vn:8443
More informationBài 10: Cấu trúc dữ liệu
KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN CÔNG NGHỆ PHẦN MỀM Bài 10: Bài giảng LẬP TRÌNH CƠ BẢN Tài liệu tham khảo Kỹ thuật lập trình C: cơ sở và nâng cao, Phạm Văn Ất, Nhà xuất bản KHKT Chương 7 2 Mục tiêu Tìm
More informationAryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9
Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths
More informationC/Java Syntax. January 13, Slides by Mark Hancock (adapted from notes by Craig Schock)
C/Java Syntax 1 Lecture 02 Summary Keywords Variable Declarations Data Types Operators Statements if, switch, while, do-while, for Functions 2 By the end of this lecture, you will be able to identify the
More informationC/Java Syntax. Lecture 02 Summary. Keywords Variable Declarations Data Types Operators Statements. Functions. if, switch, while, do-while, for
C/Java Syntax 1 Lecture 02 Summary Keywords Variable Declarations Data Types Operators Statements if, switch, while, do-while, for Functions 2 1 By the end of this lecture, you will be able to identify
More informationPRINCIPLES OF OPERATING SYSTEMS
PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)
More informationComputer Programming. C Array is a collection of data belongings to the same data type. data_type array_name[array_size];
Arrays An array is a collection of two or more adjacent memory cells, called array elements. Array is derived data type that is used to represent collection of data items. C Array is a collection of data
More informationBasic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island
Basic C Programming (2) Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Data Types Basic Types Enumerated types The type void Derived types
More informationCSCI-243 Exam 1 Review February 22, 2015 Presented by the RIT Computer Science Community
CSCI-243 Exam 1 Review February 22, 2015 Presented by the RIT Computer Science Community http://csc.cs.rit.edu History and Evolution of Programming Languages 1. Explain the relationship between machine
More informationNHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU. Bài 10: Thư viện Pandas (2)
NHẬP MÔN LẬP TRÌNH KHOA HỌC DỮ LIỆU Bài 10: Thư viện Pandas (2) Nội dung 1. Chữa bài tập buổi trước 2. Làm việc với panel 3. Chọn và nhóm phần tử 4. Sử dụng pandas trong bài toán thực tế 5. Bài tập TRƯƠNG
More informationUnit 5. Decision Making and Looping. School of Science and Technology INTRODUCTION
INTRODUCTION Decision Making and Looping Unit 5 In the previous lessons we have learned about the programming structure, decision making procedure, how to write statements, as well as different types of
More informationPrinciples of C and Memory Management
COMP281 Lecture 8 Principles of C and Memory Management Dr Lei Shi Last Lecture Pointer Basics Previous Lectures Arrays, Arithmetic, Functions Last Lecture Pointer Basics Previous Lectures Arrays, Arithmetic,
More informationHướng dẫn cài đặt FPT
Hướng dẫn cài đặt Email FPT ---X--- Cài đặt email @FPT.VN bằng phần mềm Thunder Bird Bước 1: Mở Thunder Bird, chọn Tools >> Account Setting Bước 2: Tại Account Setting, chọn Account Actions >> Add Mail
More informationCS 0449 Sample Midterm
Name: CS 0449 Sample Midterm Multiple Choice 1.) Given char *a = Hello ; char *b = World;, which of the following would result in an error? A) strlen(a) B) strcpy(a, b) C) strcmp(a, b) D) strstr(a, b)
More information{ int kk, ll; kk = ii + jj; ll = ii * jj; return (kk, ll); } A. Function addmult() return 7 and 12 B. No output C. Error: Compile error D.
SAP TECHNICAL PAPER 1. If int is 2 bytes wide.what will be the output of the program? void fun(char**); char *argv[] = "ab", "cd", "ef", "gh"; fun(argv); void fun(char **p) char *t; t = (p+= sizeof(int))[-1];
More informationDynamic memory allocation
Dynamic memory allocation outline Memory allocation functions Array allocation Matrix allocation Examples Memory allocation functions (#include ) malloc() Allocates a specified number of bytes
More informationLecture 02 Summary. C/Java Syntax 1/14/2009. Keywords Variable Declarations Data Types Operators Statements. Functions
Lecture 02 Summary C/Java Syntax Keywords Variable Declarations Data Types Operators Statements if, switch, while, do-while, for Functions 1 2 By the end of this lecture, you will be able to identify the
More informationKỹ thuật thu nhỏ đối tượng trong Design (Layout)
Kỹ thuật thu nhỏ đối tượng trong Design (Layout) Viết bởi : Steve Smith http://smith9x.wordpress.com - Kỹ thuật này do mình tự nghĩ ra, đơn giản hóa cụ thể như sau : + Ta sẽ thiết kế các đối tượng lớn
More informationC PROGRAMMING QUESTIONS AND
8/26/2011 C C PROGRAMMING QUESTIONS AND ANSWER http://cquestionbank.blogspot.com Ritesh kumar (1) What will be output if you will compile and execute the following c code? struct marks{ int p:3; int c:3;
More informationA3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE
A3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be
More informationDr. R. Z. Khan, Associate Professor, Department of Computer Science
ALIGARH MUSLIM UNIVERSITY Department of Computer Science Course: CSM-102: Programming & Problem Solving Using C Academic Session 2015-2016 UNIT-2: Handout-3 Topic: Control Structures (Selection & Repetition)
More informationComputer Programming Unit 3
POINTERS INTRODUCTION Pointers are important in c-language. Some tasks are performed more easily with pointers such as dynamic memory allocation, cannot be performed without using pointers. So it s very
More informationC aptitude interview questions
C aptitude interview questions What is the output of following C programs? 1) clrscr(); clrscr(); No output/error The first clrscr() occurs inside a function. So it becomes a function call. In the second
More informationLibrary Functions. General Questions
1 Library Functions General Questions 1. What will the function rewind() do? A. Reposition the file pointer to a character reverse. B. Reposition the file pointer stream to end of file. C. Reposition the
More informationArrays. An array is a collection of several elements of the same type. An array variable is declared as array name[size]
(November 10, 2009 2.1 ) Arrays An array is a collection of several elements of the same type. An array variable is declared as type array name[size] I The elements are numbered as 0, 1, 2... size-1 I
More informationAnswer all questions. Write your answers only in the space provided. Full marks = 50
Answer all questions. Write your answers only in the space provided. Full marks = 50 1. Answer the following: [2+3+2+1=8 marks] a) What are the minimum and maximum numbers that can be represented in 10-bit
More informationCOMPUTER APPLICATION
Total No. of Printed Pages 16 HS/XII/A.Sc.Com/CAP/14 2 0 1 4 COMPUTER APPLICATION ( Science / Arts / Commerce ) ( Theory ) Full Marks : 70 Time : 3 hours The figures in the margin indicate full marks for
More informationChương 6. Transport Layer. Tài liệu : Forouzan, Data Communication and Networking
Chương 6 Transport Layer Tài liệu : Forouzan, Data Communication and Networking 1 Transport Layer Nội dung Đặc trưng của tầng transport Port number Multiplexing và Demultiplexing Connectionless Service
More informationBÀI 6 LÀM VIỆC VỚI THÀNH PHẦN MỞ RỘNG CỦA CSS3
BÀI 6 LÀM VIỆC VỚI THÀNH PHẦN MỞ RỘNG CỦA CSS3 NHẮC LẠI BÀI TRƯỚC Làm việc với các thuộc tính mới trong CSS3: Border-radius Border-image Gradient Transform, transition, animation Làm việc với font web
More informationSubject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100
Code: DC-05 Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100 NOTE: There are 11 Questions in all. Question 1 is compulsory and carries 16 marks. Answer to Q. 1. must be written in the space
More informationĐỀ CƯƠNG CHI TIẾT HỌC PHẦN
BM01.QT02/ĐNT-ĐT TRƯỜNG ĐH NGOẠI NGỮ - TIN HỌC TP.HCM KHOA CÔNG NGHỆ THÔNG TIN CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập Tự do Hạnh Phúc 1. Thông tin chung về học phần ĐỀ CƯƠNG CHI TIẾT HỌC PHẦN - Tên
More informationadvanced data types (2) typedef. today advanced data types (3) enum. mon 23 sep 2002 defining your own types using typedef
today advanced data types (1) typedef. mon 23 sep 2002 homework #1 due today homework #2 out today quiz #1 next class 30-45 minutes long one page of notes topics: C advanced data types dynamic memory allocation
More informationTEST BDA24202 / BTI10202 COMPUTER PROGRAMMING May 2013
DEPARTMENT OF MATERIAL AND ENGINEERING DESIGN FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING UNIVERSITI TUN HUSSEIN ONN MALAYSIA (UTHM), JOHOR TEST BDA24202 / BTI10202 COMPUTER PROGRAMMING May 2013
More informationContents. A Review of C language. Visual C Visual C++ 6.0
A Review of C language C++ Object Oriented Programming Pei-yih Ting NTOU CS Modified from www.cse.cuhk.edu.hk/~csc2520/tuto/csc2520_tuto01.ppt 1 2 3 4 5 6 7 8 9 10 Double click 11 12 Compile a single source
More informationLAB 4(4 tiết): Thực hành ứng dụng GUI(tiếp)
THỰC HÀNH CÔNG CỤ VÀ MÔI TRƯỜNG VÀ LẬP TRÌNH 2 --------------------------------------------------------------------------------------------------- TS. Võ Phương Bình Email: binhvp@dlu.edu.vn Information
More informationSIMULATE AND CONTROL ROBOT
SIMULATE AND CONTROL ROBOT CÁC BƯỚC THỰC HIỆN MÔ PHỎNG ĐIỀU KHIỂN ROBOT: Vẽ lại mô hình robot trong PRO_E 4.0. Liên kết mô hình với phần MATHLAB 2008. Xây dựng giao diện MATHLAB để điều khiển các mô hình.
More informationGV: Phạm Đình Sắc or
Giới Thiệu: Lập trình ứng dụng Windows Form in VB.Net 2005 Thời lượng: 45 tiết LT 30 tiết TH GV: Phạm Đình Sắc Email: sacvn@yahoo.com or dinhsac@gmail.com Windows Form programming with VB.Net 2005. 1 Buổi
More informationCÁC KIỂU DỮ LIỆU TRỪU TƯỢNG CƠ BẢN TẬP HỢP
CÁC KIỂU DỮ LIỆU TRỪU TƯỢNG CƠ BẢN TẬP HỢP Đỗ Thanh Nghị dtnghi@cit.ctu.edu.vn NỘI DUNG Khái niệm tập hợp Phép toán trên tập hợp Cài đặt tập hợp Từ điển Bảng băm 2 KHÁI NIỆM TẬP HỢP Là tập hợp các thành
More informationInternet Protocol. Bởi: Phạm Nguyễn Bảo Nguyên
Internet Protocol Bởi: Phạm Nguyễn Bảo Nguyên Chúng ta đã biết cách tạo User Profile và check mail từ Exchange Server với tùy chọn này nghĩa là bạn đang check mail bằng giao thức MAPI mà chỉ có khi cài
More information