Introduction to C – Questions & Answers

Introduction to C

  1. Which of the following language is predecessor to C Programming Language?
  • A
  • B
  • BCPL
  • C++

Ans : 2

  1. Who developed C programming language ?
  • Dennis Ritchie
  • Ken Thompson
  • Bill Gates
  • Peter Norton

Ans : 1

  1. C was developed in the year ___
  • 1970
  • 1972
  • 1976
  • 1980

Ans : 2

  1. C is a ___ language
  • High Level
  • Low Level
  • Middle Level
  • Machine Level

Ans : 3

  1. C language is available for which of the following Operating Systems?
  • DOS
  • Windows
  • Unix
  • All of these

Ans : 4

  1. Which of the following symbol is used to denote a pre-processor statement?
  • !
  • #
  • ~
  • ;

Ans : 2

  1. Which of the following is a Scalar Data type
  • Float
  • Union
  • Array
  • Pointer

Ans : 1

  1. Which of the following are tokens in C?
  • Keywords
  • Variables
  • Constants
  • All of the above

Ans : 4

  1. What is the valid range of numbers for int type of data?
  • 0 to 256
  • -32768 to +32767
  • -65536 to +65536
  • No specific range

Ans : 1

  1. Which symbol is used as a statement terminator in C?
  • !
  • #
  • ~
  • ;

Ans : 4

  1. Which escape character can be used to begin a new line in C?
  • \a
  • \b
  • \m
  • \n

Ans : 4

  1. Which escape character can be used to beep from speaker in C?
  • \a
  • \b
  • \m
  • \n

Ans : 2

  1. Character constants should be enclosed between ___
  • Single quotes
  • Double quotes
  • Both a and b
  • None of these

Ans : 2

 

 

  1. String constants should be enclosed between ___
  • Single quotes
  • Double quotes
  • Both a and b
  • None of these

Ans : 1

  1. Which of the following is invalid?
  • ‘’
  • “ “
  • ‘a’
  • ‘abc’

Ans : 4

  1. The maximum length of a variable in C is ___
  • 8
  • 16
  • 32
  • 64

Ans : 1

  1. What will be the maximum size of a float variable?
  • 1 byte
  • 2 bytes
  • 4 bytes
  • 8 bytes

Ans : 2

  1. What will be the maximum size of a double variable?
  • 1 byte
  • 4 bytes
  • 8 bytes
  • 16 bytes

Ans : 4

  1. A declaration float a,b; occupies ___ of memory
  • 1 byte
  • 4 bytes
  • 8 bytes
  • 16 bytes

Ans : 2

  1. The size of a String variable is
  • 1 byte
  • 8 bytes
  • 16 bytes
  • None of these

Ans : 4

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s