Pointers

Q1: Will the program compile?
#include<stdio.h>
int main()
{
    char str[5] = "AptitudeCrack";
    return 0;
}

A True

B False

ANS:A - True

C doesn't do array bounds checking at compile time, hence this compiles. But, the modern compilers like Turbo C++ detects this as 'Error: Too many initializers'. GCC would give you a warning.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.