CrazyForCode

Crazy For Code Quiz
Test your knowledge of C++ programming concepts with the Crazy For Code Quiz. This quiz is designed for programmers at all levels, from beginners to advanced developers. It's a fun and engaging way to assess your skills and learn new things in the process.
Features:
- Multiple choice questions
- Instant feedback on your answers
- Score tracking to measure your progress
1. What would be the result of the following code?
#include <iostream.h>
int x[100];
int main()
{
cout<<x[99]<<end;
}
Unpredictable
Run time error
0
99
2. Which of the following adds one string to the end of another?
Append();
Strcmp();
Stringadd();
Strcat();
3.
#include <iostream.h>
int I;
class A
{
public : ~A()
{i=10;}
};
int food(){
i=3;
A obj;
return I;
}
int main(){
cout<<food()<<endl;
return 0;
}
The result will be?
0
3
10
None of these
4. What will happen on execution of this program?
#include<stdio.h>
int main(){
int main = 3;
printf("%d", main);
return 0;
}
It will cause a compile-time error
It will cause a run-time error
It will run without any error and prints 3
It will experience infinite looping
5. Inline function useful when:
Function is small and we want to avoid function call ourselves
Function is large with many nested loops
Function has many static variables
None of the above
6. Default storage class if not specified for a local variable, is auto
Depends on the standard
False
True
None of the above mentioned
7. In which stage the following code
#include <stdio.h>
gets replaced by the contents of the file stdio.h
During editing
During preprocessing
During linking
During execution
8. What will be the output of following program ? (for 32 bits compiler)
#include <stdio.h>
int main()
{
int MAX=10;
int array[MAX];
printf("size of array is = %d",sizeof(array);
return 0;
}Size of array is = 20
Size of array is = 4
Error
Size of array is = 40
9. What will be the output of the following C code?
#include <stdio.h>
void main() {
int x = 1, z = 3;
int y = x << 3;
printf(" %d\n", y);
}
8
-1
Error
-2147483648
10. What will be the output of the following program
#include <stdio.h>
int main() {
printf("crazyfor\code\n");
return 0;
}
crazyfor
code
Codeyfor
Crazyforcode
Crazyfor
bonus question
The associativity of which of the following operator is left to right in c++?
Address of
Unary operator
Logical not
Array element access
{"name":"CrazyForCode", "url":"https://www.supersurvey.com/QPREVIEW","txt":"Test your knowledge of C++ programming concepts with the Crazy For Code Quiz. This quiz is designed for programmers at all levels, from beginners to advanced developers. It's a fun and engaging way to assess your skills and learn new things in the process.Features:Multiple choice questionsInstant feedback on your answersScore tracking to measure your progress","img":"https:/images/course6.png"}
More Surveys
Chapter 2 Meaningful Names & Chapter 3 Functions
10511
Design Patterns Quiz
10525
Behavioral & Structural Design Pattern Quiz Quiz
10516
Agile Maturity Test
1050
The Scrum Framework
1477
Test automation training - entry knowledge check
10525
Linting rules
10510
ISTQB Test
11616
CS FOLDER PROJECT
1589
Skills
1169
Admin Applications
9414
Security
847