
TECHCROMA 2K24 - Code Change Filteration Process.
Presentation
•
Computers
•
University
•
Practice Problem
•
Hard
Amburu Kumar
Used 148+ times
FREE Resource
0 Slides • 20 Questions
1
Multiple Choice
Write the output of the following program.
#include <stdio.h>
#define m 5+5
const int n = 5+5;
void main( )
{
int a = 0, b = 0;
a = m * m;
b = n * n;
printf("%d %d\n", a, b);
}
35 100
100 100
100 35
Compilation error
2
Multiple Choice
Write the output of the following program.
#include <stdio.h>
void f(int a[ ], int n)
{
int i;
for (i = 0; i < n - 1; ++i)
a[i] += i+1[a];
}
int main ( )
{
int a[5] = {1, 2, 4, 60, 80};
f(a, 4);
printf("%d", a[4] - 3[a]);
return 0;
}
Compilation error
20
-20
2
3
Multiple Choice
What will be the output from the following program?
main( )
{
int a=(int)malloc(sizeof(int));
*a= -41;
printf("%d",(*a)+++*a++);
}
a)70
-90
Runtime Error
-81
4
Multiple Choice
What will be the output from the following program?
void main( )
{
int p=-40,q=-20;
p= ~-q<<~-p + q>>2;
printf("%d", p);
}
-42
b. 42
c. 24
d. -24
5
Multiple Choice
What will be the output from the following program?
#define N -300
void main( )
{
printf("N = %d\n",N);
#undef N
#ifdef N
printf("NECN")
#endif
}
Compilation error
N = -300
N = -300
NECN
Runtime error
6
Multiple Choice
What will be the output from the following program?
void main( )
{
int a, p[10]={-1,-2,-3,-4,-5,-6,-7,-8,-9,-10};
a=(p+2)[4];
printf("%d",a);
}
Compilation error
Runtime error
Logical error
None of these
7
Multiple Choice
What will be the output from the following program?
void main( )
{
extern float abc;
abc=13.0;
printf("%d\n",sizeof(abc+10.3));
}
Compilation error
Runtime error
4
None
8
Multiple Choice
What will be the output from the following program?
#include<stdio.h>
void func(char**);
int main( )
{
char *a[ ] = { "1", "2", "3", "4", "5", "6" };
func(a);
return 0;
}
void func(char **p)
{
char *p1;
p1 = (p += sizeof(float))[-3];
printf("%s\n", p1);
}
1
3
4
None of these
9
Multiple Choice
What will be the output of the following program
void main( )
{
printf( );
}
Run-Time Error
Compile-Time Error
No Output
None of these
10
Multiple Choice
What will be the output of the following program :
void main( )
{
printf(NULL);
}
Run-Time Error
Compile-Time Error
No Output
None of these
11
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("%%",7);
}
7
Compile-Time Error
%
%%
12
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("//",5);
}
5
Compile-Time Error
/
//
13
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("d%",8);
}
8
Compile-Time Error
d%
None of these
14
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("%d",printf("Hi!")+printf("Bye"));
}
ByeHi!6
Hi!Bye6
Compile-Time Error
None of these
15
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("%d",printf("Hi!")*printf("Bye"));
}
ByeHi!6
Hi!Bye9
Hi!Bye
None of these
16
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("%d",printf("")+printf(""));
}
0
No Output
Compile-Time Error
None of these
17
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("Hi Friends"+3);
}
Hi Friends
Friends
Hi Friends3
None of these
18
Multiple Choice
What will be the output of the following program :
void main( )
{
printf("Work" "Hard");
}
Work
Hard
No Output
WorkHard
19
Multiple Choice
What will be the output of the following program :
void main( )
{
int val=5,num;
printf("%d",scanf("%d %d",&val,&num));
}
[NOTE : ASSUME 2 values are entered by the user are stored in the variables 'val' & 'num' respectively]
1
2
5
None of these
20
Multiple Choice
What will be the output of the following program :
void main( )
{
int val=5;
val=printf("C") + printf("Skills"); printf("%d",val);
}
Skills5
C1
Compile-Time Error
CSkills7
Write the output of the following program.
#include <stdio.h>
#define m 5+5
const int n = 5+5;
void main( )
{
int a = 0, b = 0;
a = m * m;
b = n * n;
printf("%d %d\n", a, b);
}
35 100
100 100
100 35
Compilation error
Show answer
Auto Play
Slide 1 / 20
MULTIPLE CHOICE
Similar Resources on Wayground
11 questions
Python
Presentation
•
University
16 questions
Publicidad en las redes sociales
Presentation
•
12th Grade
15 questions
CAI 711 - Week 4 P1
Presentation
•
12th Grade
14 questions
DARING 1
Presentation
•
Professional Development
13 questions
Medios de transmisión
Presentation
•
University
19 questions
Programming Languages. (II)
Presentation
•
University
19 questions
Dangling and misplaced modifiers
Presentation
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade