Constants and Variables
in C Programming
1
C Tokens
• Variables :-
• Variables are the values, that can change value during execution of
program.
• int i; → Declaration of variable
• i=5; → Definotion of Variable
• int j=10 ; → Declaration and definition both in single statement
Elements of C Programming
Variable Names :-
Variable name are identifier , used to identify or name variable.
Eg. int var;
var =125;
var
2000
125 var- A symbolic name is given to memory location.
Which is valid C expression?
a) int my_num = 100,000;
b) int my_num = 100000;
c) int my num = 1000;
d) int $my_num = 10000;
Which is valid C expression?
a) int my_num = 100,000;
b) int my_num = 100000;
c) int my num = 1000;
d) int $my_num = 10000;
Answer: b
Explanation: Space, comma and $ cannot be used in a variable
name.
Multiple Variable Declarations
• Can create multiple variables of the same type in one statement:
int x, y, z;
is a shorthand for
int x;
int y;
int z;
- stylistically, the latter is often preferable
Multiple Declaration Initialization
• Can provide one value for variables initialized in one statement:
int x, y, z = 0;
• Each variable declared and then initialized with the value
Type
• Set of possible values
• defines size, how values stored, interpreted
• Operations that can be performed on those possible values
• Data types are associated with objects in C (variables, functions, etc.)
Elements of C Programming
Basic Data Types
(Type of Data :- Numeric, Character, Alphanumeric)
Datatype Value that can be store
char A single byte that can hold one character
int An integer value .-3,-2,0,1,4
float A Single precision floating point number
double A double precision floating point number
Precision number of significant digits after the decimal points
Void Type
• Type name: void
• Possible values: none
• Operations: none
• Useful as a placeholder
Elements of C Programming
Qualifiers :- A qualifier alter the characteristics of the datatype, such as
its size and sign.
Two types of Qualifier :-
1. Size – (a) short (b) long
2. Sign- (a) signed (b) unsigned
Elements of C Programming
Qualifiers
Eg :- short int a; -> 16 bits
long int a; -> 32 bits;
1. The size assigned by short and long depends on compiler.
2. The long can also be used with double.
3. short and long can not be used with char and float.
Elements of C Programming
Qualifiers
eg :-signed short int a;
unsigned short int a;
• It is also applicable to char :-- signed char a;
unsigned char b;
• Signed qualifier are not applicable to float, double and long double.
What is short int in C programming?
a) The basic data type of C
b) Qualifier
c) Short is the qualifier and int is the basic data type
d) All of the mentioned
What is short int in C programming?
a) The basic data type of C
b) Qualifier
c) Short is the qualifier and int is the basic data type
d) All of the mentioned
Answer: c
Explanation: None.
Integer Type
• Type name:
• int
• short int
• long int
• Possible values: whole numbers (within given ranges) as in 5, -35, 401
• Operations: arithmetic (addition, subtraction, multiplication, …), and
others
Integer Types/Values
Type Bytes Bits Min Val Max Val
short int 2 16 -32768 32767
int 4 32 -2147483648 2147483647
long int 4 32 -2147483648 2147483647
Why Limited?
• With a fixed number of bits, only a certain number of possible
patterns
• 16 bits, 65,536 possible patterns
• 32768 negative numbers
• 1 zero
• 32767 positive numbers
• Overflow: attempt to store a value to large in a variable (40000 in
short int)
Unsigned Integers
• Type: unsigned int
• No negative values
• unsigned int:
• possible values: 0 to 65536
• Representation: binary number
Floating-Point Type
• Type names:
• float
• double
• long double
• Possible values: floating point numbers, 5.0 -3.5, 4.01
• Operations: arithmetic (addition, subtraction, multiplication, …), and
others
Floating-Point Representation
• float: 4 bytes, 32 bits
• double: 8 bytes, 64 bits
• long double: 10 bytes, 80 bits
• Representation:
• magnitude (some number of bits) plus exponent (remainder of bits)
• 3.26 * 10^4 for 32600.0
Which of the following is a valid variable declaration in C?
a) int 1number;
b) float number 1;
c) char letter = 'A';
d) double@value;
Which of the following is a valid variable declaration in C?
a) int 1number;
b) float number 1;
c) char letter = 'A';
d) double@value;
Answer: c) char letter = 'A';
What will happen if you declare a variable without initializing it in C?
a) It will contain a garbage value.
b) It will be automatically set to 0.
c) The program will throw an error.
d) The compiler will assign a random value.
What will happen if you declare a variable without initializing it in C?
a) It will contain a garbage value.
b) It will be automatically set to 0.
c) The program will throw an error.
d) The compiler will assign a random value.
Answer: a) It will contain a garbage value.
How do you correctly declare and initialize an integer variable in C?
a) int x = 10;
b) x = 10;
c) declare int x = 10;
d) variable x = 10;
How do you correctly declare and initialize an integer variable in C?
a) int x = 10;
b) x = 10;
c) declare int x = 10;
d) variable x = 10;
Answer: a) int x = 10;
What is the correct way to declare multiple variables in C?
a) int a, b, c;
b) int a = 5; b = 10; c = 15;
c) int a; float b; char c;
d) Both a and c
What is the correct way to declare multiple variables in C?
a) int a, b, c;
b) int a = 5; b = 10; c = 15;
c) int a; float b; char c;
d) Both a and c
Answer: d) Both a and c
Which of the following is NOT a valid C variable declaration?
a) int number = 10;
b) float PI = 3.14;
c) char letter = "A";
d) double percentage = 95.5;
Which of the following is NOT a valid C variable declaration?
a) int number = 10;
b) float PI = 3.14;
c) char letter = "A";
d) double percentage = 95.5;
Answer: c) char letter = "A"; (should be char letter = 'A';)
What is the purpose of the void keyword in C?
a) It defines an empty function
b) It specifies a function does not return a value
c) It creates a variable of type void
d) Both (a) and (b)
What is the purpose of the void keyword in C?
a) It defines an empty function
b) It specifies a function does not return a value
c) It creates a variable of type void
d) Both (a) and (b)
Answer: d) Both (a) and (b)
Which of the following is NOT a rule for naming identifiers in C?
a) Identifiers must start with a letter or underscore
b) Identifiers can include spaces
c) Identifiers cannot be a C keyword
d) Identifiers can include numbers after the first character
Which of the following is NOT a rule for naming identifiers in C?
a) Identifiers must start with a letter or underscore
b) Identifiers can include spaces
c) Identifiers cannot be a C keyword
d) Identifiers can include numbers after the first character
Answer: b) Identifiers can include spaces
Which of the following C keywords is used to define a constant value?
a) constant
b) const
c) define
d) let
Which of the following C keywords is used to define a constant value?
a) constant
b) const
c) define
d) let
Answer: b) const
Which of the following declaration is not supported by C language?
a) String str;
b) char *str;
c) float str = 3e2;
d) Both “String str;” and “float str = 3e2;”
Which of the following declaration is not supported by C language?
a) String str;
b) char *str;
c) float str = 3e2;
d) Both “String str;” and “float str = 3e2;”
Which of the following is NOT a valid size qualifier in C?
A) short
B) long
C) double
D) long long
Which of the following is NOT a valid size qualifier in C?
A) short
B) long
C) double
D) long long
Answer: C) double (It is a data type, not a size qualifier)
Which of the following is a valid signed integer type in C?
A) signed short int
B) signed long int
C) signed char
D) All of the above
Which of the following is a valid signed integer type in C?
A) signed short int
B) signed long int
C) signed char
D) All of the above
Answer: D) All of the above
What is the default sign of int in C if no sign qualifier is specified?
A) unsigned
B) signed
C) Depends on the compiler
D) int does not have a default sign
What is the default sign of int in C if no sign qualifier is specified?
A) unsigned
B) signed
C) Depends on the compiler
D) int does not have a default sign
Answer: B) signed
What is the size (in bytes) of a long long int in a typical
64-bit system?
A) 2 bytes
B) 4 bytes
C) 8 bytes
D) 16 bytes
What is the size (in bytes) of a long long int in a typical
64-bit system?
A) 2 bytes
B) 4 bytes
C) 8 bytes
D) 16 bytes
Answer: C) 8 bytes
Which of the following statements about signed and
unsigned types is correct?
A) signed variables cannot store negative values
B) unsigned variables can store negative values
C) unsigned variables can only store positive values and
zero
D) signed variables always have a larger range than
unsigned
Which of the following statements about signed and
unsigned types is correct?
A) signed variables cannot store negative values
B) unsigned variables can store negative values
C) unsigned variables can only store positive values and
zero
D) signed variables always have a larger range than
unsigned
Answer: C) unsigned variables can only store positive
values and zero
Which of the following data types has the largest range in C?
A) unsigned int
B) signed int
C) long long int
D) unsigned long long int
Which of the following data types has the largest range in C?
A) unsigned int
B) signed int
C) long long int
D) unsigned long long int
Answer: D) unsigned long long int
C Tokens
• Constants :-
A constant does not change its value during the entire execution of the
program.
• Integer Constants :- 48 6875 001 9 64 (Space not allowed)
• Floating Point Constants
• Character Constants
• Enumeration constants
• String literals
C Tokens
Integer Constants
Ordinary Octal Number Hexadecimal Number
Decimal (base 8) (base 16)
Number Number specified ‘0x’ or ‘0X’
(base 10) by leading ‘0” zero 0x175 = (373)10
0175 = (125)10
C Tokens
• A size and sign qualifier can be appended at the end of the constant.
• u – for – unsigned inter constant – 56789u / 56789U
• l – for –long int constant – 7689909l / 7689909L
-- 0xf4A3L
• The suffixes can be combined and can be use in any order.
• 6578890994UL/6578890994LU
• Short integer constant – 120s, -1000s
• Unsigned short integer constant -120us
C Tokens
• The suffixes are not needed, The compiler considers large integer
constants to be of the type long automatically.
• but
• These suffixes are useful in situations where the value may fit in an int,
but you want to treat it as long .
C Tokens
Floating Point Constants:-
• Floating Point constants have a decimal point or an exponential sign or
both.
• Eg:- 2000.0434, 3.4e4 , 3E8 , 3.4E.4 , 3e_8
• Decimal notation :- Number is represented as whole number followed by
a decimal point and a fractional part. It is possible to omit digits before
and after the decimal point.
C Tokens
Floating Point Constants:-
• Exponential Notation :- Exponential notation is useful in represnting
numbers whose magnitudes are very large and very small.
• The exponential notation consists of a mantissa and exponent.
• 231.78 = 0.23178e3 = 0.23178* 103
Decimal Mantissa Exponent
Floating-Point Literals
• Syntax:
• Zero or more digits, decimal point, then zero or more digits (at least one
digit)
• Whole numbers also treated as float
• Optional sign at start
• Can be followed by e and whole number (to represent exponent)
• f or F at end for float
• l or L at end for long double
• Examples: 5, .5, 0.5, -1.0, 2.1e+3, 5.1f
Character Type
• Type name: char
• Possible values: keys that can be typed at the keyboard
• Representation: each character assigned a value (ASCII values), 8 bits
• A - binary number 65
• a - binary number 97
• b - binary number 98
• 2 - binary number 50
Character Literals
• Single key stroke between quote char ‘
• Examples: ‘A’, ‘a’, ‘b’, ‘1’, ‘@’
• Some special chars:
• ‘\0’ - null char
• ‘\t’ - tab char
• ‘\n’ - newline char
• ‘\’’ - single quote char
• ‘\\’ - backslash char
Which of the following is a valid integer constant in C?
a) 23.5
b) "25"
c) 0x1A
d) '9'
C Tokens
Character Constants :-
• A Character constant is a single character enclosed within single quotes.
• eg :- ‘a’ , ‘4’, ‘\n’ ‘ab’ ,’54’
• Back slash character starts an escape sequnce.
• Escape sequnce characters are also known as backslash character
constants.
• These are used for formatting output.
C Tokens
Character Constants Characteristics
• (1) It represents single character.
• (2) These are nonprinting characters.
• (3) Each escape sequence has unique ASCII value.
• (4) It can also be expressed in terms of octal digits or hexadecimal
sequence.
C Tokens
Escape Sequence and their Meaning
• \a :- Beep Sound
• \b :- Back Space
• \f :- Formfeed ????
• \t :- Horizontal tab
• \r:- Carriage Return
• \\:- Back slash
• \’ :- Single Quotes
• \” :- Double Quotes
•
C Tokens
Escape Sequence and their Meaning
• \? :- Question Mark
• \0 :- Null
• \0ooo :- Code specified in octal
• \xhh :- Code specified in Hexadecimal
C Tokens
Enumeration Constants
• Enumeration are convenient way to associate constant integers with
meaningful names
• An enumeration is a user defined type with values ranging over a finite
set of identifiers called enumeration constants.
For eg :- enum color( red,blue,green)
Define color as a new type havong three values red,blue and green.
C Tokens
How to use ????
color c;
red=0; blue = 1; green =2 ;
c= blue ;
printf(“As an int , c has the value %d \n”,c);
Output :- As an int , c has the value 1
C Tokens
• Constant values can be explicitly specified for identifiers, when the value
of one identifier is specified in this manner, the value of the next
element is next higher integer.
enum color = { red =10, blue, green };
c = blue ;
Result c= 11;
.
C Tokens
• Names in different enums must be distinct – in same program
• enum emotion{happy,hot,cool}; Invalid
• enum weather{ hot,cold,wet}; will create ambiguity
• Values need not be distinct in the same enumeration, means
enum weather {hot,warm=0,cold,wet};
The names hot and warm can be interchangeably used, since both
represents the value zero.
C Tokens
String Literals
• A string literal is a sequence of characters enclosed within double
quotes.
• The character may consists of letters, numbers ,escape sequence and
spaces.
• Imp Points
• ‘A’ :- Character Constant – occupy 1 byte for ASCII value of A.
• “A” :- String constant – occupy 2 bytes
1- for ASCII code of A
Another for the null character with value 0 (zero).
String Literals
• No string type (more later)
• Contained between double quote chars (“)
• Examples:
“” - null string
“A string”
“String with newline \n char in it”
“String with a double quote \” in it”
Which of the following is a valid integer constant in C?
a) 23.5
b) "25"
c) 0x1A
d) '9'
Answer: c) 0x1A
Which of the following is a character constant?
a) 'A'
b) "A"
c) A
d) 'Hello'
Which of the following is a character constant?
a) 'A'
b) "A"
c) A
d) 'Hello'
Answer: a) 'A'
A floating-point constant in C must contain:
a) Only digits
b) A decimal point or an exponent
c) Only whole numbers
d) Single quotes
A floating-point constant in C must contain:
a) Only digits
b) A decimal point or an exponent
c) Only whole numbers
d) Single quotes
Answer: b) A decimal point or an exponent
Which of the following is an example of an octal constant in C?
a) 010
b) 0x10
c) 10
d) 0b1010
Which of the following is an example of an octal constant in C?
a) 010
b) 0x10
c) 10
d) 0b1010
Answer: a) 010
The prefix for a hexadecimal constant in C is:
a) 0
b) 0b
c) 0x
d) 0X
The prefix for a hexadecimal constant in C is:
a) 0
b) 0b
c) 0x
d) 0X
Answer: c or d
Which of the following is a string constant?
a) "Hello, World!"
b) 'H'
c) HelloWorld
d) None of the above
Which of the following is a string constant?
a) "Hello, World!"
b) 'H'
c) HelloWorld
d) None of the above
Answer: a) "Hello, World!"
Which of the following is an invalid integer constant?
a) 32767
b) -2147483648
c) 0347
d) 45.67
Which of the following is an invalid integer constant?
a) 32767
b) -2147483648
c) 0347
d) 45.67
Answer: d) 45.67
A character constant in C is enclosed within:
a) Single quotes (' ')
b) Double quotes (" ")
c) Curly braces { }
d) Parentheses ( )
A character constant in C is enclosed within:
a) Single quotes (' ')
b) Double quotes (" ")
c) Curly braces { }
d) Parentheses ( )
Answer: a) Single quotes (' ')
The constant 0.56 is of which type in C?
a) Integer
b) Character
c) Floating-point
d) String
The constant 0.56 is of which type in C?
a) Integer
b) Character
c) Floating-point
d) String
Answer: c) Floating-point
What is the default type of an integer constant in C?
a) int
b) long int
c) short int
d) unsigned int
What is the default type of an integer constant in C?
a) int
b) long int
c) short int
d) unsigned int
Answer: a) int
Which of the following is not a valid floating-point constant?
a) 1.2E3
b) .45
c) 4.0f
d) 45..6
Which of the following is not a valid floating-point constant?
a) 1.2E3
b) .45
c) 4.0f
d) 45..6
Answer: d) 45..6
The escape sequence \n represents:
a) A backslash
b) A new line
c) A tab space
d) A null character
The escape sequence \n represents:
a) A backslash
b) A new line
c) A tab space
d) A null character
Answer: b) A new line
Which of the following is a valid hexadecimal constant?
a) 0xF5
b) 0XG9
c) 45H
d) 0b1010
Which of the following is a valid hexadecimal constant?
a) 0xF5
b) 0XG9
c) 45H
d) 0b1010
Answer: a) 0xF5
How can we declare a constant in C?
a) Using #define
b) Using const keyword
c) Both a and b
d) None of the above
How can we declare a constant in C?
a) Using #define
b) Using const keyword
c) Both a and b
d) None of the above
Answer: c) Both a and b
Which of the following is not a valid string constant?
a) "Hello"
b) ""
c) 'A'
d) "1234"
Which of the following is not a valid string constant?
a) "Hello"
b) ""
c) 'A'
d) "1234"
Answer: c) 'A'
What is an escape sequence in C?
a) A combination of two characters
b) A character preceded by a backslash (\)
c) A keyword in C
d) A predefined function
What is an escape sequence in C?
a) A combination of two characters
b) A character preceded by a backslash (\)
c) A keyword in C
d) A predefined function
Answer: b) A character preceded by a backslash (\)
Which of the following is NOT a valid escape sequence in C?
a) \n
b) \t
c) \y
d) \r
Which of the following is NOT a valid escape sequence in C?
a) \n
b) \t
c) \y
d) \r
Answer: c) \y
Which escape sequence represents a tab space in C?
a) \n
b) \t
c) \b
d) \r
Which escape sequence represents a tab space in C?
a) \n
b) \t
c) \b
d) \r
Answer: b) \t
The escape sequence \b is used for:
a) Newline
b) Backspace
c) Tab space
d) Carriage return
The escape sequence \b is used for:
a) Newline
b) Backspace
c) Tab space
d) Carriage return
Answer: b) Backspace
Which of the following represents a backslash (\) in C?
a) \\
b) \b
c) /
d) \
Which of the following represents a backslash (\) in C?
a) \\
b) \b
c) /
d) \
Answer: a) \\
Which escape sequence represents a carriage return?
a) \n
b) \r
c) \b
d) \a
Which escape sequence represents a carriage return?
a) \n
b) \r
c) \b
d) \a
Answer: b) \r
What does the escape sequence \a do?
a) Deletes a character
b) Produces a beep sound
c) Moves to a new line
d) Returns to the beginning of the line
What does the escape sequence \a do?
a) Deletes a character
b) Produces a beep sound
c) Moves to a new line
d) Returns to the beginning of the line
Answer: b) Produces a beep sound
Which escape sequence is used to print a double quote (") inside a string?
a) \'
b) \"
c) \q
d) ""
Which escape sequence is used to print a double quote (") inside a string?
a) \'
b) \"
c) \q
d) ""
Answer: b) \"
What does \0 represent in C?
a) Newline
b) Null character
c) Space
d) Escape key
What does \0 represent in C?
a) Newline
b) Null character
c) Space
d) Escape key
Answer: b) Null character
What does \0 represent in C?
a) Newline
b) Null character
c) Space
d) Escape key
Answer: b) Null character
What does \f do in C?
a) Moves the cursor to a new line
b) Clears the screen
c) Moves the cursor to the next form feed page
d) Produces a beep sound
What does \f do in C?
a) Moves the cursor to a new line
b) Clears the screen
c) Moves the cursor to the next form feed page
d) Produces a beep sound
Answer: c) Moves the cursor to the next form feed page
What does \v do in C?
a) Produces a vertical tab space
b) Moves the cursor to the next line
c) Inserts a horizontal tab
d) Prints a backslash
What does \v do in C?
a) Produces a vertical tab space
b) Moves the cursor to the next line
c) Inserts a horizontal tab
d) Prints a backslash
Answer: a) Produces a vertical tab space
What is the purpose of \? in C?
a) It represents a question mark (?)
b) It represents a null character
c) It prevents trigraph sequences from being misinterpreted
d) It prints a slash
What is the purpose of \? in C?
a) It represents a question mark (?)
b) It represents a null character
c) It prevents trigraph sequences from being misinterpreted
d) It prints a slash
Answer: c) It prevents trigraph sequences from being misinterpreted
What is an enum in C?
a) A function
b) A user-defined data type
c) A preprocessor directive
d) A built-in constant
What is an enum in C?
a) A function
b) A user-defined data type
c) A preprocessor directive
d) A built-in constant
Answer: b) A user-defined data type
What is the default data type of an enum in C?
a) char
b) float
c) int
d) double
What is the default data type of an enum in C?
a) char
b) float
c) int
d) double
Answer: c) int
Which keyword is used to define an enumeration in C?
a) enum
b) define
c) typedef
d) struct
Which keyword is used to define an enumeration in C?
a) enum
b) define
c) typedef
d) struct
Answer: a) enum
How can you explicitly assign values to an enum in C?
a) Using = operator
b) Using : operator
c) Using -> operator
d) Using == operator
How can you explicitly assign values to an enum in C?
a) Using = operator
b) Using : operator
c) Using -> operator
d) Using == operator
Answer: a) Using = operator
What will be the output of the following code?
c
enum Days {SUN = 1, MON, TUE}; printf("%d", TUE);
a) 1
b) 2
c) 3
d) Compilation error
What will be the output of the following code?
c
enum Days {SUN = 1, MON, TUE}; printf("%d", TUE);
a) 1
b) 2
c) 3
d) Compilation error
Answer: c) 3 (MON is 2, TUE is 3)
What will be the value of GREEN in the following code?
c
enum Color {RED, GREEN, BLUE};
a) 0
b) 1
c) 2
d) 3
What will be the value of GREEN in the following code?
enum Color {RED, GREEN, BLUE};
a) 0
b) 1
c) 2
d) 3
Answer: b) 1 (By default, the first value is 0, and the rest increment by 1)
What is the size of an enum in C?
a) 1 byte
b) 2 bytes
c) Implementation dependent (usually 4 bytes like int)
d) 8 bytes
What is the size of an enum in C?
a) 1 byte
b) 2 bytes
c) Implementation dependent (usually 4 bytes like int)
d) 8 bytes
Answer: c) Implementation dependent (usually 4 bytes like int)
What happens if an enum is declared without assigning any values?
a) Compilation error
b) The first value starts from 0 and increments by 1
c) All values are set to NULL
d) Undefined behavior
What happens if an enum is declared without assigning any values?
a) Compilation error
b) The first value starts from 0 and increments by 1
c) All values are set to NULL
d) Undefined behavior
Answer: b) The first value starts from 0 and increments by 1
What is a string literal in C?
a) A variable that stores strings
b) A sequence of characters enclosed in double quotes
c) A function that processes strings
d) A special type of array
What is a string literal in C?
a) A variable that stores strings
b) A sequence of characters enclosed in double quotes
c) A function that processes strings
d) A special type of array
Answer: b) A sequence of characters enclosed in double quotes
What is the type of a string literal in C?
a) char *
b) const char *
c) char []
d) int *
What is the type of a string literal in C?
a) char *
b) const char *
c) char []
d) int *
Answer: b) const char * (Since C11, string literals are immutable and
stored as const char *)
What is the correct way to declare a string literal in C?
a) char str[] = "Hello";
b) char str[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
c) char *str = "Hello";
d) All of the above
What is the correct way to declare a string literal in C?
a) char str[] = "Hello";
b) char str[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
c) char *str = "Hello";
d) All of the above
Answer: d) All of the above
What is the length of the string literal "Hello" in memory?
a) 5
b) 6
c) 4
d) 7
What is the length of the string literal "Hello" in memory?
a) 5
b) 6
c) 4
d) 7
Answer: b) 6 (Includes the null terminator \0)
What is the output of the following code?
printf("%s", "Hello\0World");
a) Hello World
b) Hello
c) World
d) Compilation error
What is the output of the following code?
printf("%s", "Hello\0World");
a) Hello World
b) Hello
c) World
d) Compilation error
Answer: b) Hello (\0 terminates the string)
What does char str[] = ""; contain?
a) Empty string with null terminator
b) Compilation error
c) Undefined behavior
d) Nothing
What does char str[] = ""; contain?
a) Empty string with null terminator
b) Compilation error
c) Undefined behavior
d) Nothing
Answer: a) Empty string with null terminator