eQuiz - Multiple choice test on programming language C - part 1
TipsMake.com - Welcome to the quiz series of TipsMake.com with topics related to the fields of information technology. And this time we will continue with part 1 of the C programming knowledge test series, a total of 15 questions will be answered with no time to answer each sentence.
Question 1: What is the output of the following code?
#include main () { int x = 5 ; if ( x = 5 ) { if ( x = 5 ) break ; printf ( "TipsMake.com hello!" ); } printf ( "TipsMake.com" ); }
A - Compilation error.
B - TipsMake.com hello!
C - TipsMake.com
D - Compiler warning.
Question 2: What is the size of the union definition below?
#include union abc { char a , b , c , d , e , f , g , h ; int i ; } abc ; main () { printf ( "% d" , sizeof ( abc )); }
A - 1
B - 2
C - 4
D - 8
Question 3: Please indicate the option to attach a file to the current program is invalid below:
A - #include
B - #include 'file'
C - #include
D - All của số này không hợp lệ.
Question 4: What is the output of the following program?
A - Compilation error
B - Runtime Error
C - 5
D - 10
Question 5: Are local variables in C stored in .?
A - Code segment
B - Stack segment
C - Heap segment
D - No answer right
Question 6: Where does the C rewind () library function reposition the internal cursor of the file?
A - File head.
B - End of file.
C - Between files
D - Position specified.
Question 7: The cursor formula is equivalent to using array elements a [i] [j] [k] [2] is?
A - (((a + m) + n) + o) + p)
B - * (* (* (* (a + i) + j) + k) +2)
C - * ((((a + m) + n) + o + p)
D - * (((a + m) + n + o + p)
Question 8: In the code below, P2 is:
A - Integer
B - Integer pointer
C - Both Integer and Integer pointer
D - There is no right answer
Question 9: What does the following command define?
int * ptr [10];
A - ptr is an array pointer with 10 integer pointer.
B - ptr is an array of 10 pointers to integers.
C - ptr is an array of 10 integer pointers
D - There is no right answer
Question 10: What is the output of the code below?
#include
int main ()
{
int a = 10;
if (a == a--)
printf ("TRUE 1 t");
a = 10;
if (a == --a)
printf ("TRUE 2 t");
}
A - TRUE 1
B - TRUE 2
C - TRUE 1 TRUE 2
D - No output
Question 11: Where is a valid C expression?
A - int my_num = 100,000
B - int my_num = 100000
C - int my num = 1000
D- int $ my_num = 10000
Question 12: This is the output of the following code:
#include
int main ()
{
printf ("TipsMake.com!% dn", x);
return 0;
}
A - TipsMake.com! x
B - TipsMake.com! with junk worth going after
C - Compilation error
D - TipsMake.com!
Question 13: What happens if the following code is executed?
#include
int main ()
{
int main = 3;
printf ("% d", main);
return 0;
}
A - Create compilation error
B - Generate runtime error
C - It will run without error and print 3 to the screen
D - It will create an infinite loop
Question 14: This is the output of the following code:
#include
int main ()
{
char chr;
chr = 128;
printf ("% dn", chr);
return 0;
}
A - 128
B - -128
C - Depending on the compiler
D - There is no right answer
Question 15: This is the output of the following code:
#include
int main ()
{
char * p [1] = {"TipsMake.com"};
printf ("% s", (p) [0]);
return 0;
}
A - Compilation error
B - Unknown error
C - TipsMake.com
D - No answer right
Question 16: This is the output of the following code C:
#include
int main ()
{
printf ("quantrimang.comn");
return 0;
}
A - quantrimang.com
B - quantrimang.
code
C - comquantrimang.
D - quantrimang.
Question 17: Which of the following is not a logical or relational operator?
A -! =
B - ==
C - ||
D - =
Question 18: The scope of an automatic variable is:
A - In the block it appears
B - In the block of the block it appears
C - Until the end of the program
D - Both A and B
Question 19: Is the default storage layer automatic if not specified for a local variable?
A - True
B - False
C - Depends on standards
D - Not mentioned
Question 20: What is the scope of an external variable?
A - The entire source file in which the variable is defined
B - From the declaration point to the end of the file in which the variable is defined
C - Any source file in the program
D - From the declaration point to the end of the file being compiled
Answer:
1. A 2. C 3. C 4. D 5. B 6. A 7. B 8. B 9. C 10. B 11. B 12. C 13. C 14. B 15. C 16. A 17. D 18. D 19. A 20. DGood luck!
You should read it
- eQuiz - Quiz on Core Java - Part 1
- eQuiz - Multiple choice test on ASP (Active Server Pages) Advance - Part 2
- eQuiz - Quiz on Core Java - Part 2
- eQuiz - VB.NET testing test - Part 1
- eQuiz - Multiple choice test on JDBC - Part 1
- Test on JAVA test P5
- eQuiz - Multiple choice test on ASP
- eQuiz - Multiple choice test on C # - part 2
May be interested
- Test on JAVA P10 testmultiple choice questions on java programming help you test your basic knowledge of this programming language. the set of questions includes 10 sentences to try.
- Test on JAVA test P7a set of multiple-choice questions about java gives you useful knowledge for work and study. the set of questions below includes 10 sentences for you to experience.
- eQuiz - Multiple choice test on ASPhere is a small test of asp web programming language, a total of 30 questions will be answered with no time to answer each sentence.
- eQuiz - Multiple choice test on JDBC - Part 1in the quiz below, we will introduce you to part 1 of the jdbc basic knowledge test series with 15 questions.
- Test on JAVA test on P9unlike most common programming languages, instead of compiling the source code into machine code or interpreting source code when running, java is designed to compile the source code into bytecode, then bytecode will be run by the runtime environment. . to help you better understand this programming language, the following quiz of network administrator will give you lots of useful knowledge.
- JAVA P8 test quizif you are interested in learning about the java programming language, the following quiz of network administrator will provide you with a lot of useful knowledge for your learning.
- CSS test with answer - Part 2a set of multiple choice questions about css programming for you to try and understand.
- eQuiz - Quiz on Core Java - Part 2in the quiz below, you will be able to try out part 2 of the series related to core java - one of the most popular programming languages today. in total, the test will have 15 questions in the form of multiple choice, with an unlimited response time ...
- eQuiz - Multiple choice test on ASP (Active Server Pages) Advance - Part 2we will continue with the next test on the advance asp web programming language, in total there will be 15 questions with no time to answer each sentence.
- Test on C programming P4the c language is the most widely used computer language, along with the java language, the leading popular programming languages, widely used in modern developers. below, invite readers to test their knowledge on this topic through the multiple-choice questions below.