Top Banner

of 96

C Programming Quiz

Jun 04, 2018

Download

Documents

Yasser Ibrahim
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/13/2019 C Programming Quiz

    1/96

    Cover Page

    C Programming

    Language

    Author: JavaChamp Team

    Copyright (c) 2010-2014

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    2/96

    (2) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    About Us

    Powered by QuizOver.com

    The Leading Online Quiz & Exam Creator

    Create, Share, and Discover Quizzes & Exams

    http://www.quizover.com

  • 8/13/2019 C Programming Quiz

    3/96

    (3) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    Disclaimer

    All services and content of QuizOver.com are provided under QuizOver.com terms of use on an "as is" basis,

    without warranty of any kind, either expressed or implied, including, without limitation, warranties that the provided

    services and content are free of defects, merchantable, fit for a particular purpose or non-infringing.

    The entire risk as to the quality and performance of the provided services and content is with you.

    In no event shall QuizOver.com be liable for any damages whatsoever arising out of or in connection with the use

    or performance of the services.

    Should any provided services and content prove defective in any respect, you (not the initial developer, author or

    any other contributor) assume the cost of any necessary servicing, repair or correction.

    This disclaimer of warranty constitutes an essential part of these "terms of use".

    No use of any services and content of QuizOver.com is authorized hereunder except under this disclaimer.

    The detailed and up to date "terms of use" of QuizOver.com can be found under:

    http://www.QuizOver.com/public/termsOfUse.xhtml

  • 8/13/2019 C Programming Quiz

    4/96

    (4) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    eBook Content License

    Creative Commons License

    Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)

    http://creativecommons.org/licenses/by-nc-nd/3.0/

    You are free to:

    Share: copy and redistribute the material in any medium or format

    The licensor cannot revoke these freedoms as long as you follow the license terms.

    Under the following terms:

    Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You

    may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

    NonCommercial: You may not use the material for commercial purposes.

    NoDerivatives: If you remix, transform, or build upon the material, you may not distribute the modified material.

    No additional restrictions: You may not apply legal terms or technological measures that legally restrict others

    from doing anything the license permits.

  • 8/13/2019 C Programming Quiz

    5/96

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    -

    (5) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    Table of Contents

    Quiz Permalink: http://www.quizover.com/pdf/c-certification-questions

    Author Profile: http://www.quizover.com/user/profile/Java.Champ

    1. C Programming Language

    Basics

    Arithmetic operators

    Logical operators and Conditions

    Print out Statements

    Flow Control

    Inputs Reading

    Assignement

    Arrays

    Methods and Functions

    Identifiers and Variables

    Data Types

    Strings

    http://www.quizover.com/pdf/c-certification-questionshttp://www.quizover.com/user/profile/Java.Champhttp://-/?-http://-/?-http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/c-certification-questions
  • 8/13/2019 C Programming Quiz

    6/96

    (6) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4. Chapter: Basics

    1. Basics Questions

  • 8/13/2019 C Programming Quiz

    7/96

    (7) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.1. Question: The C programming Language is

    The C programming Language is

    Please choose only one answer:

    Low level language

    High level language

    Machine language

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: c languagePermalink: http://www.quizover.com/pdf/c-language

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/c-languagehttp://www.quizover.com/pdf/c-languagehttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    8/96

    (8) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.2. Question: To include a header file in a C program:

    To include a header file in a C program:

    Please choose only one answer:

    #include "stdio.h" ;

    #include "stdio.h"

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: include in CPermalink: http://www.quizover.com/pdf/include-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/include-in-chttp://www.quizover.com/pdf/include-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    9/96

    (9) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.3. Question: the #include keyword in c language is:

    the #include keyword in c language is:

    Please choose only one answer:

    executive c statement

    compiler directive

    both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to include in C?Permalink: http://www.quizover.com/pdf/how-to-include-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-include-in-chttp://www.quizover.com/pdf/how-to-include-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    10/96

    (10) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.4. Question: To include a header file in a C program:

    To include a header file in a C program:

    Please choose only one answer:

    #include "stdio.h"

    #include

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: how to include a header in C?Permalink: http://www.quizover.com/pdf/how-to-include-a-header-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-include-a-header-in-chttp://www.quizover.com/pdf/how-to-include-a-header-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    11/96

    (11) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.5. Question: The main() function is:

    The main() function is:

    Please choose only one answer:

    to write output to the screen

    the program entry point

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: main function in CPermalink: http://www.quizover.com/pdf/main-function-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/main-function-in-chttp://www.quizover.com/pdf/main-function-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    12/96

    (12) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.6. Question: How to write comments in C language?

    How to write comments in C language?

    Please choose only one answer:

    Use /* .. */ for multi-line comments

    Use // for single-line comments

    Both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write comments in C language?Permalink: http://www.quizover.com/pdf/how-to-write-comments-in-c-language

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-comments-in-c-languagehttp://www.quizover.com/pdf/how-to-write-comments-in-c-languagehttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    13/96

    (13) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    4.1.7. Question: The computer performs computations internally using

    The computer performs computations internally using

    Please choose only one answer:

    Binary number system

    Decimal number system

    Hexadec. number system

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: Binary number systemPermalink: http://www.quizover.com/pdf/binary-number-system

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/binary-number-systemhttp://www.quizover.com/pdf/binary-number-systemhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    14/96

    (14) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5. Chapter: Arithmetic operators

    1. Arithmetic operators Questions

  • 8/13/2019 C Programming Quiz

    15/96

    (15) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.1. Question: To compute the square of the value in variable a:

    To compute the square of the value in variable a:

    Please choose only one answer:

    b = a^2;

    z = a * a;

    both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to square a value in C?Permalink: http://www.quizover.com/pdf/how-to-square-a-value-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-square-a-value-in-chttp://www.quizover.com/pdf/how-to-square-a-value-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    16/96

    (16) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.2. Question: The value of z in the following statement:

    int x = 9 , y = 2 , z...

    The value of z in the following statement:

    int x = 9 , y = 2 , z = x / y;

    Please choose only one answer:

    4

    4.5

    5

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: arithmetic operators in CPermalink: http://www.quizover.com/pdf/arithmetic-operators-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/arithmetic-operators-in-chttp://www.quizover.com/pdf/arithmetic-operators-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    17/96

    (17) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.3. Question: choose the proper function to compute the cubic value of any input ...

    choose the proper function to compute the cubic value of any input integer n:

    Please choose only one answer:

    int cube(void) { return (n * n * n) ; }

    int cube(int n) { return (n * n * n) ; }

    void cube(int n) { return (n * n * n) ; }

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: write method in CPermalink: http://www.quizover.com/pdf/write-method-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/write-method-in-chttp://www.quizover.com/pdf/write-method-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    18/96

    (18) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.4. Question: what is the output of the following piece of code

    what is the output of the following piece of code

    Please choose only one answer:

    3

    4

    5

    Author: JavaChamp Team

    int a = 1, b = 2, c;c = a-- + b--;printf(%d,c);

    Check the answer of this question online on QuizOver.com:Question: decrementation in CPermalink: http://www.quizover.com/pdf/decrementation-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/decrementation-in-chttp://www.quizover.com/pdf/decrementation-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    19/96

    (19) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.5. Question: What is the output of the following piece of code?

    What is the output of the following piece of code?

    Please choose only one answer:

    8

    9

    10

    Author: JavaChamp Team

    int x = 3, y = 5, z;z = x + ++y;printf(%d,z);

    Check the answer of this question online on QuizOver.com:Question: How to increment int in C?Permalink: http://www.quizover.com/pdf/how-to-increment-int-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-increment-int-in-chttp://www.quizover.com/pdf/how-to-increment-int-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    20/96

    (20) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.6. Question: A short-cut for the statement: x = x + 1;

    A short-cut for the statement: x = x + 1;

    Please choose only one answer:

    x += 1;

    x++;

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: post increment in CPermalink: http://www.quizover.com/pdf/post-increment-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/post-increment-in-chttp://www.quizover.com/pdf/post-increment-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    21/96

    (21) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.7. Question: what is the output of the following piece of code

    int z = 23 % 3;

    what is the output of the following piece of code

    int z = 23 % 3;

    Please choose only one answer:

    7

    2

    30

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: remainder operator in CPermalink: http://www.quizover.com/pdf/remainder-operator-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/remainder-operator-in-chttp://www.quizover.com/pdf/remainder-operator-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    22/96

    (22) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.8. Question: To compute the cube of the value in variable x:

    To compute the cube of the value in variable x:

    Please choose only one answer:

    c = x * x * x;

    c = x^3;

    Both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: C arithmetic operatorsPermalink: http://www.quizover.com/pdf/c-arithmetic-operators

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/c-arithmetic-operatorshttp://www.quizover.com/pdf/c-arithmetic-operatorshttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    23/96

    (23) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.9. Question: what is the output of the following piece of code:

    what is the output of the following piece of code:

    Please choose only one answer:

    1

    2

    3

    Author: JavaChamp Team

    int c = 19 % 4;

    Check the answer of this question online on QuizOver.com:Question: How to use Remainder operator in C?Permalink: http://www.quizover.com/pdf/how-to-use-remainder-operator-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-use-remainder-operator-in-chttp://www.quizover.com/pdf/how-to-use-remainder-operator-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    24/96

    (24) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.10. Question: printf("%f", sqrt(sqrt (x)));

    printf("%f", sqrt(sqrt (x)));

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How sqrt method works in C?Permalink: http://www.quizover.com/pdf/how-sqrt-method-works-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-sqrt-method-works-in-chttp://www.quizover.com/pdf/how-sqrt-method-works-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    25/96

    (25) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.11. Question: What is the output of the following piece of code:

    What is the output of the following piece of code:

    Please choose only one answer:

    8

    9

    10

    Author: JavaChamp Team

    int x = 3, y = 5, z;z = ++x + ++y;printf(%d,z);

    Check the answer of this question online on QuizOver.com:Question: How to increment in C?Permalink: http://www.quizover.com/pdf/how-to-increment-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-increment-in-chttp://www.quizover.com/pdf/how-to-increment-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    26/96

    (26) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    5.1.12. Question: What is the output of the following piece of code?

    What is the output of the following piece of code?

    Please choose only one answer:

    8

    9

    10

    Author: JavaChamp Team

    int x = 3, y = 5, z ;z = x++ + ++y;printf(%d,z);

    Check the answer of this question online on QuizOver.com:Question: How incrementation works in C?Permalink: http://www.quizover.com/pdf/how-incrementation-works-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-incrementation-works-in-chttp://www.quizover.com/pdf/how-incrementation-works-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    27/96

    (27) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6. Chapter: Logical operators and Conditions

    1. Logical operators and Conditions Questions

  • 8/13/2019 C Programming Quiz

    28/96

    (28) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.1. Question: What is the result of compiling and running the following code?

    What is the result of compiling and running the following code?

    Please choose only one answer:

    no output is produced

    c is smaller than C

    c is greater than C

    compilation error

    Author: Yasser Ibrahim

    public static void main(String[] args) {

    char c = 'c';String result = (c > 'C') ? "c is greater than C " : "c is smaller than C";System.out.print(result);

    }

    Check the answer of this question online on QuizOver.com:Question: conditional operator in JavaPermalink: http://www.quizover.com/pdf/conditional-operator-in-java

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/conditional-operator-in-javahttp://www.quizover.com/pdf/conditional-operator-in-javahttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    29/96

    (29) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.2. Question: The operator = in the Boolean condition if( age = 3 )

    The operator = in the Boolean condition if( age = 3 )

    Please choose only one answer:

    assignment operator

    check for equality condition operator

    both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write if statement in C?Permalink: http://www.quizover.com/pdf/how-to-write-if-statement-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-if-statement-in-chttp://www.quizover.com/pdf/how-to-write-if-statement-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    30/96

    (30) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.3. Question: what is the result of the condition ( x ;; y ) given the declaratio...

    what is the result of the condition ( x ;; y ) given the declaration :

    int x = 1 , y = 2 ;

    Please choose only one answer:

    false

    unknown

    true

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: logical AND operator in CPermalink: http://www.quizover.com/pdf/logical-and-operator-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/logical-and-operator-in-chttp://www.quizover.com/pdf/logical-and-operator-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    31/96

    (31) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.4. Question: consider the following statement:

    if( 7 ) printf("CHECK");

    consider the following statement:

    if( 7 ) printf("CHECK");

    Please choose only one answer:

    the printf() statement will always be executed

    the printf() statement will never be executed

    Depends on the compiler

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how conditions evaluated in CPermalink: http://www.quizover.com/pdf/how-conditions-evaluated-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-conditions-evaluated-in-chttp://www.quizover.com/pdf/how-conditions-evaluated-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    32/96

    (32) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.5. Question: What is the result of the condition ( a ;; b ) given the following ...

    What is the result of the condition ( a ;; b ) given the following declaration :

    Please choose only one answer:

    true

    false

    unknown

    Author: JavaChamp Team

    int a = 3 , b = 1 ;

    Check the answer of this question online on QuizOver.com:Question: How to evaluate conditions in C?Permalink: http://www.quizover.com/pdf/how-to-evaluate-conditions-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-evaluate-conditions-in-chttp://www.quizover.com/pdf/how-to-evaluate-conditions-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    33/96

    (33) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.6. Question: the ; operator in the Boolean condition if( (x>5) ; ( y < 9 ) ) &h...

    the ; operator in the Boolean condition if( (x>5) ; ( y < 9 ) )

    Please choose only one answer:

    bit-wise AND operator

    address operator

    logical AND operator

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: bit-wise AND operator in CPermalink: http://www.quizover.com/pdf/bitwise-and-operator-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/bitwise-and-operator-in-chttp://www.quizover.com/pdf/bitwise-and-operator-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    34/96

    (34) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.7. Question: what is the result of the condition ( x ; y ) given the declaration...

    what is the result of the condition ( x ; y ) given the declaration:

    int x = 1 , y = 2 ;

    Please choose only one answer:

    true

    unknown

    false

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: bit-wise AND C operatorPermalink: http://www.quizover.com/pdf/bitwise-and-c-operator

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/bitwise-and-c-operatorhttp://www.quizover.com/pdf/bitwise-and-c-operatorhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    35/96

    (35) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.8. Question: To find the max value between x,y :

    To find the max value between x,y :

    Please choose only one answer:

    if ( x > y ) max = x;

    else max = y;

    max = y;

    if ( x > y ) max = x;

    both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to find max value in C?Permalink: http://www.quizover.com/pdf/how-to-find-max-value-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-find-max-value-in-chttp://www.quizover.com/pdf/how-to-find-max-value-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    36/96

    (36) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.9. Question: What is the output of the following piece of code:

    What is the output of the following piece of code:

    Please choose only one answer:

    no output

    7

    3

    Author: JavaChamp Team

    int x = 7;if ( x = 3 ) printf( %d , x);

    Check the answer of this question online on QuizOver.com:Question: How to evaluate C conditions?Permalink: http://www.quizover.com/pdf/how-to-evaluate-c-conditions

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-evaluate-c-conditionshttp://www.quizover.com/pdf/how-to-evaluate-c-conditionshttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    37/96

    (37) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    6.1.10. Question: if ( 16 = m ) printf("m is 16");

    if ( 16 = m ) printf("m is 16");

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write C if statement?Permalink: http://www.quizover.com/pdf/how-to-write-c-if-statement

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-c-if-statementhttp://www.quizover.com/pdf/how-to-write-c-if-statementhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    38/96

    (38) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7. Chapter: Print out Statements

    1. Print out Statements Questions

  • 8/13/2019 C Programming Quiz

    39/96

    (39) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.1. Question: To write statement hi world:

    To write statement hi world:

    Please choose only one answer:

    puts(hi world);

    puts("hi world");

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to print out a String in C?Permalink: http://www.quizover.com/pdf/how-to-print-out-a-string-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-print-out-a-string-in-chttp://www.quizover.com/pdf/how-to-print-out-a-string-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    40/96

    (40) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.2. Question: To write the ASCII code of char ch=x;

    To write the ASCII code of char ch=x;

    Please choose only one answer:

    printf("%d",ch);

    putch(ch);

    printf("%d", ascii(ch));

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to print out ASCII in c?Permalink: http://www.quizover.com/pdf/how-to-print-out-ascii-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-print-out-ascii-in-chttp://www.quizover.com/pdf/how-to-print-out-ascii-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    41/96

    (41) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.3. Question: To write the value of x where:

    double x = 0.12345;

    To write the value of x where:

    double x = 0.12345;

    Please choose only one answer:

    printf( "%lf " , x);

    printf( "%f " , x);

    printf( "%ld " , x);

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to print double in C?Permalink: http://www.quizover.com/pdf/how-to-print-double-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-print-double-in-chttp://www.quizover.com/pdf/how-to-print-double-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    42/96

    (42) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.4. Question: To print character a:

    To print character a:

    Please choose only one answer:

    putch("a");

    putch(a);

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to print out a character in C?Permalink: http://www.quizover.com/pdf/how-to-print-out-a-character-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-print-out-a-character-in-chttp://www.quizover.com/pdf/how-to-print-out-a-character-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    43/96

    (43) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.5. Question: what is the best choice to print the value of variable x where:

    ...

    what is the best choice to print the value of variable x where:

    int x = 123;

    Please choose only one answer:

    printf("%d",x);

    printf("%c",x);

    printf("%f",x);

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: print int in CPermalink: http://www.quizover.com/pdf/print-int-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/print-int-in-chttp://www.quizover.com/pdf/print-int-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    44/96

    (44) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.6. Question: what is the best choice to print the value of variable y where:flo...

    what is the best choice to print the value of variable y where:float y = 2.34;

    Please choose only one answer:

    printf("%d",y);

    printf("%f",y);

    printf("%c",y);

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: printf float in CPermalink: http://www.quizover.com/pdf/printf-float-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/printf-float-in-chttp://www.quizover.com/pdf/printf-float-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    45/96

    (45) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    7.1.7. Question: To write string char str[30] = "C Language";

    What to use?

    To write string char str[30] = "C Language";

    What to use?

    Please choose only one answer:

    printf("%s",str);

    puts(str);

    Both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to print out in c?Permalink: http://www.quizover.com/pdf/how-to-print-out-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-print-out-in-chttp://www.quizover.com/pdf/how-to-print-out-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    46/96

    (46) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8. Chapter: Flow Control

    1. Flow Control Questions

  • 8/13/2019 C Programming Quiz

    47/96

    (47) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.1. Question: consider the following statement:

    while ( 1 ) ;

    consider the following statement:

    while ( 1 ) ;

    Please choose only one answer:

    Infinite loop

    Syntax error

    Depends on the compiler

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: infinite loop in CPermalink: http://www.quizover.com/pdf/infinite-loop-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/infinite-loop-in-chttp://www.quizover.com/pdf/infinite-loop-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    48/96

    (48) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.2. Question: What is the output of the following piece of code:

    What is the output of the following piece of code:

    Please choose only one answer:

    One

    Two

    TwoThree

    Author: Yasser Ibrahim

    switch(2) {case 1: printf(One);break;case 2: printf(Two);break;case 3: printf(Three);break;}

    Check the answer of this question online on QuizOver.com:Question: how switch works in C?Permalink: http://www.quizover.com/pdf/how-switch-works-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-switch-works-in-chttp://www.quizover.com/pdf/how-switch-works-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    49/96

    (49) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.3. Question: To write character array

    char mystr[50] = "string" , i = 0;

    To write character array

    char mystr[50] = "string" , i = 0;

    Please choose only one answer:

    len = strlen (mystr);

    for ( i = 0 ; i < len ; i++ ) putch(mystr [i] );

    for ( i = 0 ; i < 50 ; i++ ) putch(mystr [i] );

    Both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write a for loop in C?Permalink: http://www.quizover.com/pdf/how-to-write-a-for-loop-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-a-for-loop-in-chttp://www.quizover.com/pdf/how-to-write-a-for-loop-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    50/96

    (50) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.4. Question: for(j=63 , i < 95 , i +=3) x += sqrt(j);

    for(j=63 , i < 95 , i +=3) x += sqrt(j);

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: using for loop in CPermalink: http://www.quizover.com/pdf/using-for-loop-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/using-for-loop-in-chttp://www.quizover.com/pdf/using-for-loop-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    51/96

    (51) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.5. Question: consider the following statement:

    while ( 3 ) ;

    consider the following statement:

    while ( 3 ) ;

    Please choose only one answer:

    Infinite loop

    Syntax error

    Executes only 3 iterations

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: infinite while loop in CPermalink: http://www.quizover.com/pdf/infinite-while-loop-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/infinite-while-loop-in-chttp://www.quizover.com/pdf/infinite-while-loop-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    52/96

    (52) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.6. Question: What is the output of the following piece of code:

    What is the output of the following piece of code:

    Please choose only one answer:

    Default

    One

    Two

    Author: Yasser Ibrahim

    switch(476) {case 1: printf(One);break;case 2: printf(Two);break;default: printf(Default);break;}

    Check the answer of this question online on QuizOver.com:Question: how to write switch statement in C?Permalink: http://www.quizover.com/pdf/how-to-write-switch-statement-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-write-switch-statement-in-chttp://www.quizover.com/pdf/how-to-write-switch-statement-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    53/96

    (53) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.7. Question: while (degree < 100 ); count+= degree;

    while (degree < 100 ); count+= degree;

    Please choose only one answer:

    is correct and causes no runtime error

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to write while loop in C?Permalink: http://www.quizover.com/pdf/how-to-write-while-loop-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-while-loop-in-chttp://www.quizover.com/pdf/how-to-write-while-loop-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    54/96

    (54) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.8. Question: while (degree < 100 ) count+= degree++;

    while (degree < 100 ) count+= degree++;

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: while loop in CPermalink: http://www.quizover.com/pdf/while-loop-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/while-loop-in-chttp://www.quizover.com/pdf/while-loop-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    55/96

  • 8/13/2019 C Programming Quiz

    56/96

    (56) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    8.1.10. Question: What is the output of the following piece of code:

    What is the output of the following piece of code:

    Please choose only one answer:

    One

    Two

    TwoThree

    Author: Yasser Ibrahim

    switch(2) {case 1: printf(One);break;case 2: printf(Two);case 3: printf(Three);break;}

    Check the answer of this question online on QuizOver.com:Question: how to write switch in C?Permalink: http://www.quizover.com/pdf/how-to-write-switch-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-write-switch-in-chttp://www.quizover.com/pdf/how-to-write-switch-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    57/96

    (57) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    9. Chapter: Inputs Reading

    1. Inputs Reading Questions

  • 8/13/2019 C Programming Quiz

    58/96

    (58) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    9.1.1. Question: To get a statement from the user input in the array char s[100]:

    To get a statement from the user input in the array char s[100]:

    Please choose only one answer:

    gets( s[100] );

    gets( s[] );

    gets( s );

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to read inputs into an array in C?Permalink: http://www.quizover.com/pdf/how-to-read-inputs-into-an-array-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-read-inputs-into-an-array-in-chttp://www.quizover.com/pdf/how-to-read-inputs-into-an-array-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    59/96

    (59) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    9.1.2. Question: To get a statement from the user input in the array

    char s[100] :

    To get a statement from the user input in the array

    char s[100] :

    Please choose only one answer:

    gets( s );

    scanf( "%s", s );

    Both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to read user inputs in C?Permalink: http://www.quizover.com/pdf/how-to-read-user-inputs-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-read-user-inputs-in-chttp://www.quizover.com/pdf/how-to-read-user-inputs-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    60/96

    (60) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    9.1.3. Question: scanf("%d", ;time);

    scanf("%d", ;time);

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write C scanf?Permalink: http://www.quizover.com/pdf/how-to-write-c-scanf

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-c-scanfhttp://www.quizover.com/pdf/how-to-write-c-scanfhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    61/96

    (61) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    9.1.4. Question: what is the best choice to input the value of variable c where:cha...

    what is the best choice to input the value of variable c where:char c;

    Please choose only one answer:

    scanf("%d", ;c);

    scanf("%f", ;c);

    scanf("%c", ;c);

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: read char in CPermalink: http://www.quizover.com/pdf/read-char-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/read-char-in-chttp://www.quizover.com/pdf/read-char-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    62/96

    (62) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    10. Chapter: Assignement

    1. Assignement Questions

  • 8/13/2019 C Programming Quiz

    63/96

    (63) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    10.1.1. Question: To assign the value of integer x into character ch where:

    int x =...

    To assign the value of integer x into character ch where:

    int x = 5; char ch;

    Please choose only one answer:

    ch = x;

    ch = ascii(x);

    x = ch;

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to cenvert between char and int in C?Permalink: http://www.quizover.com/pdf/how-to-cenvert-between-char-and-int-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-cenvert-between-char-and-int-in-chttp://www.quizover.com/pdf/how-to-cenvert-between-char-and-int-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    64/96

    (64) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    11. Chapter: Arrays

    1. Arrays Questions

  • 8/13/2019 C Programming Quiz

    65/96

    (65) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    11.1.1. Question: To declare and initialize character array:

    To declare and initialize character array:

    Please choose only one answer:

    char s[] = { a, b , c };

    char s[] = "abc";

    both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: declare char array in CPermalink: http://www.quizover.com/pdf/declare-char-array-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/declare-char-array-in-chttp://www.quizover.com/pdf/declare-char-array-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    66/96

    (66) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    11.1.2. Question: To declare and initialize character array :

    To declare and initialize character array :

    Please choose only one answer:

    char s[] = { a, b , c };

    char s[] = "abc";

    both correct

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to declare and initialize character array in C?Permalink: http://www.quizover.com/pdf/how-to-declare-and-initialize-character-array-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-declare-and-initialize-character-array-in-chttp://www.quizover.com/pdf/how-to-declare-and-initialize-character-array-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    67/96

    (67) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    11.1.3. Question: float values(200) = ( 1 , 2 , 3 , 4 );

    float values(200) = ( 1 , 2 , 3 , 4 );

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to declare C arrays?Permalink: http://www.quizover.com/pdf/how-to-declare-c-arrays

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-declare-c-arrayshttp://www.quizover.com/pdf/how-to-declare-c-arrayshttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    68/96

    (68) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    11.1.4. Question: float values(200) = ( 1 , 2 , 3 , 4 );

    float values(200) = ( 1 , 2 , 3 , 4 );

    Please choose only one answer:

    correct

    syntax error

    run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: Arrays declaration in CPermalink: http://www.quizover.com/pdf/arrays-declaration-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/arrays-declaration-in-chttp://www.quizover.com/pdf/arrays-declaration-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    69/96

    (69) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12. Chapter: Methods and Functions

    1. Methods and Functions Questions

  • 8/13/2019 C Programming Quiz

    70/96

    (70) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.1. Question: what is the output of the following program

    what is the output of the following program

    Please choose only one answer:

    Unknown (random value)

    Zero

    3000

    Author: Yasser Ibrahim

    main(){int x;printf(%d,x);}

    Check the answer of this question online on QuizOver.com:Question: how to print int in C?Permalink: http://www.quizover.com/pdf/how-to-print-int-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-print-int-in-chttp://www.quizover.com/pdf/how-to-print-int-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    71/96

    (71) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.2. Question: int multiply(int x, int y) {

    return x*y;

    }

    int multiply(int x, int y) {

    return x*y;

    }

    Please choose only one answer:

    is correct

    has syntax error

    causes run-time error

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to write C method?Permalink: http://www.quizover.com/pdf/how-to-write-c-method

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-c-methodhttp://www.quizover.com/pdf/how-to-write-c-methodhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    72/96

    (72) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.3. Question: What is the output of the following program:

    What is the output of the following program:

    Please choose only one answer:

    5

    7

    unknown

    Author: JavaChamp Team

    int change( int x ) {x = 7; return(x);}

    main(){int x = 5;change(x);printf(%d,x);}

    Check the answer of this question online on QuizOver.com:Question: How to write a method in c?Permalink: http://www.quizover.com/pdf/how-to-write-a-method-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-write-a-method-in-chttp://www.quizover.com/pdf/how-to-write-a-method-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    73/96

    (73) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.4. Question: What is the output of the following program:

    What is the output of the following program:

    Please choose only one answer:

    8unknown

    both wrong

    Author: Yasser Ibrahim

    int sum( int x, int y ) {return (x + y);}

    main(){int x = 5 , y = 3;printf(%d, sum(x,y));}

    Check the answer of this question online on QuizOver.com:Question: How to write and call method?Permalink: http://www.quizover.com/pdf/how-to-write-and-call-method

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-write-and-call-methodhttp://www.quizover.com/pdf/how-to-write-and-call-methodhttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    74/96

    (74) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.5. Question: what is the output of the following program

    what is the output of the following program

    Please choose only one answer:

    8

    unknown

    both wrong

    Author: JavaChamp Team

    int sum( int x, int y ) {int z = x + y;}main(){int x = 5 , y = 3;printf(%d, sum(x,y));}

    Check the answer of this question online on QuizOver.com:Question: return value in c method?Permalink: http://www.quizover.com/pdf/return-value-in-c-method

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/return-value-in-c-methodhttp://www.quizover.com/pdf/return-value-in-c-methodhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    75/96

    (75) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    12.1.6. Question: what is the output of the following program

    what is the output of the following program

    Please choose only one answer:

    5

    7

    unknown

    Author: JavaChamp Team

    int change( int x ) {x = 7;}

    main(){int x = 5;change(x);printf(%d,x);}

    Check the answer of this question online on QuizOver.com:Question: pass by value in C?Permalink: http://www.quizover.com/pdf/pass-by-value-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/pass-by-value-in-chttp://www.quizover.com/pdf/pass-by-value-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    76/96

    (76) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13. Chapter: Identifiers and Variables

    1. Identifiers and Variables Questions

  • 8/13/2019 C Programming Quiz

    77/96

    (77) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.1. Question: Which of the following identifiers is a legal identifier:

    Which of the following identifiers is a legal identifier:

    Please choose only one answer:

    my mark

    my_mark

    my-mark

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: how to declare a valid variable in C?Permalink: http://www.quizover.com/pdf/how-to-declare-a-valid-variable-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-declare-a-valid-variable-in-chttp://www.quizover.com/pdf/how-to-declare-a-valid-variable-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    78/96

    (78) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.2. Question: consider the following variables declaration statement:

    int age,...

    consider the following variables declaration statement:

    int age, AGE;

    Please choose only one answer:

    Correct statement, the compiler uses age and AGE as completely different variables.

    Correct statement, the compiler uses age and AGE as the same variable.

    Wrong statement, because you cant declare more than one variable with the same name.

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: How to declare C valid variable?Permalink: http://www.quizover.com/pdf/how-to-declare-c-valid-variable

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-declare-c-valid-variablehttp://www.quizover.com/pdf/how-to-declare-c-valid-variablehttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    79/96

    (79) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.3. Question: To define a constant ABC with value 358:

    To define a constant ABC with value 358:

    Please choose only one answer:

    #define ABC = 358

    #define ABC = 358 ;

    #define ABC 358

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: how to define a constant in C?Permalink: http://www.quizover.com/pdf/how-to-define-a-constant-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-define-a-constant-in-chttp://www.quizover.com/pdf/how-to-define-a-constant-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    80/96

    (80) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.4. Question: The variables in C programming language:

    The variables in C programming language:

    Please choose only one answer:

    Must be declared before being used.

    Can be used without declaration

    Can be used before declaration

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: variable declaration in CPermalink: http://www.quizover.com/pdf/variable-declaration-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/variable-declaration-in-chttp://www.quizover.com/pdf/variable-declaration-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    81/96

    (81) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.5. Question: What is the role of variables in programming languages:

    What is the role of variables in programming languages:

    Please choose only one answer:

    Perform standard functions like printing to the screen

    Data storage

    Both correct

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: variable role in CPermalink: http://www.quizover.com/pdf/variable-role-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/variable-role-in-chttp://www.quizover.com/pdf/variable-role-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    82/96

    (82) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.6. Question: Which of the following identifiers is a legal identifier?

    Which of the following identifiers is a legal identifier?

    Please choose only one answer:

    abc#*

    #+abc

    abc

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: how to declare C legal iedntifier?Permalink: http://www.quizover.com/pdf/how-to-declare-c-legal-iedntifier

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/how-to-declare-c-legal-iedntifierhttp://www.quizover.com/pdf/how-to-declare-c-legal-iedntifierhttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    83/96

    (83) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    13.1.7. Question: Which of the following identifiers is a legal identifier :

    Which of the following identifiers is a legal identifier :

    Please choose only one answer:

    1abc

    abc 1

    abc1

    Author: Yasser Ibrahim

    Check the answer of this question online on QuizOver.com:Question: lega Identifier rules in CPermalink: http://www.quizover.com/pdf/lega-identifier-rules-in-c

    http://www.quizover.com/user/profile/Yasser.Ibrahimhttp://www.quizover.com/pdf/lega-identifier-rules-in-chttp://www.quizover.com/pdf/lega-identifier-rules-in-chttp://www.quizover.com/user/profile/Yasser.Ibrahim
  • 8/13/2019 C Programming Quiz

    84/96

    (84) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14. Chapter: Data Types

    1. Data Types Questions

  • 8/13/2019 C Programming Quiz

    85/96

    (85) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.1. Question: If MSB of a binary number is "0" then it is:

    If MSB of a binary number is "0" then it is:

    Please choose only one answer:

    Odd number

    Even number

    Positive number

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: MSB in CPermalink: http://www.quizover.com/pdf/msb-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/msb-in-chttp://www.quizover.com/pdf/msb-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    86/96

    (86) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.2. Question: what is the best choice to store the number of university students:

    what is the best choice to store the number of university students:

    Please choose only one answer:

    char n = 20000;

    float n = 20000;

    int n = 20000;

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: Data types in CPermalink: http://www.quizover.com/pdf/data-types-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/data-types-in-chttp://www.quizover.com/pdf/data-types-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    87/96

    (87) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.3. Question: If LSB of a binary number is "0" then it is:

    If LSB of a binary number is "0" then it is:

    Please choose only one answer:

    Positive number

    Even number

    Odd number

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: LSB in CPermalink: http://www.quizover.com/pdf/lsb-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/lsb-in-chttp://www.quizover.com/pdf/lsb-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    88/96

    (88) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.4. Question: The highest digit in any number system equals:

    The highest digit in any number system equals:

    Please choose only one answer:

    Zero

    Base - 1

    Base + 1

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: max value in number systemPermalink: http://www.quizover.com/pdf/max-value-in-number-system

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/max-value-in-number-systemhttp://www.quizover.com/pdf/max-value-in-number-systemhttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    89/96

    (89) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.5. Question: what is the storage size of the float data type (float)?

    what is the storage size of the float data type (float)?

    Please choose only one answer:

    1 byte

    2 byte

    4 byte

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: float storage size in CPermalink: http://www.quizover.com/pdf/float-storage-size-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/float-storage-size-in-chttp://www.quizover.com/pdf/float-storage-size-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    90/96

    (90) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.6. Question: what is the best choice to store the natural number PI = 3.1459

    what is the best choice to store the natural number PI = 3.1459

    Please choose only one answer:

    int pi = 3.1459;

    char pi = 3.1459;

    float pi = 3.1459;

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: different C data typesPermalink: http://www.quizover.com/pdf/different-c-data-types

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/different-c-data-typeshttp://www.quizover.com/pdf/different-c-data-typeshttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    91/96

    (91) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.7. Question: what is the storage size of the integer data type (char)?

    what is the storage size of the integer data type (char)?

    Please choose only one answer:

    1 byte

    2 byte

    4 byte

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: char storage size in CPermalink: http://www.quizover.com/pdf/char-storage-size-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/char-storage-size-in-chttp://www.quizover.com/pdf/char-storage-size-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    92/96

    (92) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.8. Question: what is the storage size of the float data type (int)?

    what is the storage size of the float data type (int)?

    Please choose only one answer:

    1 byte

    2 byte

    4 byte

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: int storage size in CPermalink: http://www.quizover.com/pdf/int-storage-size-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/int-storage-size-in-chttp://www.quizover.com/pdf/int-storage-size-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    93/96

    (93) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    14.1.9. Question: to assign the value of integer x into character ch where:

    int x = ...

    to assign the value of integer x into character ch where:

    int x = 5;

    char ch;

    Please choose only one answer:

    ch = x;

    ch = ascii(x);

    x = ch;

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to assign int into char in C?Permalink: http://www.quizover.com/pdf/how-to-assign-int-into-char-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-assign-int-into-char-in-chttp://www.quizover.com/pdf/how-to-assign-int-into-char-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    94/96

    (94) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    15. Chapter: Strings

    1. Strings Questions

  • 8/13/2019 C Programming Quiz

    95/96

    (95) Powered by QuizOver.com - http://www.quizover.com

    QuizOver.com is the leading online quiz & exam creator

    Copyright (c) 2009-2014 all rights reserved

    15.1.1. Question: To copy a string into another, given:

    char s1[30] = "xyz", s2[20];

    To copy a string into another, given:

    char s1[30] = "xyz", s2[20];

    Please choose only one answer:

    s2 = s1;

    strcpy(s2,s1);

    Both wrong

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: How to copy a string into another in C?Permalink: http://www.quizover.com/pdf/how-to-copy-a-string-into-another-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-copy-a-string-into-another-in-chttp://www.quizover.com/pdf/how-to-copy-a-string-into-another-in-chttp://www.quizover.com/user/profile/Java.Champ
  • 8/13/2019 C Programming Quiz

    96/96

    15.1.2. Question: to concatenate two strings into third string, given :

    char s1[30] ...

    to concatenate two strings into third string, given :

    char s1[30] = "hi", s2[20] = "world", s3[10];

    Please choose only one answer:

    s3 = s1 + s2;

    strcpy(s3,s1);strcat(s3,s2);

    s3 = strcat(s1,s2);

    Author: JavaChamp Team

    Check the answer of this question online on QuizOver.com:Question: how to concatenate strings in C?Permalink: http://www.quizover.com/pdf/how-to-concatenate-strings-in-c

    http://www.quizover.com/user/profile/Java.Champhttp://www.quizover.com/pdf/how-to-concatenate-strings-in-chttp://www.quizover.com/pdf/how-to-concatenate-strings-in-chttp://www.quizover.com/user/profile/Java.Champ