String | Data Structure Quiz for Beginners | Question 3

Last Updated :
Discuss
Comments

What is the output of the following code?

C++
#include<bits/stdc++.h> 
using namespace std;

int main()
{
    // Write C++ code here
    char str_array2[] = "Geeks";
    cout << sizeof(str_array2) << " ";
    char str_array[] = { 'G', 'e', 'e', 'k', 's'};
    cout << sizeof(str_array);
    return 0;
}

6, 6

5, 6

6, 5

None

Share your thoughts in the comments