Acc 1 Pseudocodes
Acc 1 Pseudocodes
Question 1 1) 2)
Find the output of following pseudo code for values a-10, b-6 2 4
temp=aMODb
a=b
b=emp
end while
return a
end-function
Question 2 1) 2)
What will be the output if the following pseudocode if a 10 and b-6 2 4
temp = a MOD b
a=b
b=temp
end while
return a
Question 3 1) 2)
What will be output of the following code? c++0 1 2 3 c+0 1 2 3
#include <stdio.h> 3) 4)
c++++123 c
int main()
Answer: 1
{
int x=123;
int i={
printf("C" "++")
for (x=0;x<=i,x++){
printf("%x "x):
return 0;
}
Question 4 1) 2)
What is the another notation for exponentiation. * **
3) 4)
*** *^
Answer: 2
Question 5 1) 2)
#include<stdio.h> 0 1
int i,n;
i=5
n=7
int fun(5,7);
printf("%d , f);
if (x,<=0)
return y;
else
return(fun(x-1.y-1));
}.
Question 6 1) 2)
What will be the output of the following pseudo code? 2 8
Integer x y z 3) 4)
0 64
set x=24, y=8
Answer: 4
x=x/y
Print z
[Note: << is left shift operator, it takes two numbers, left shifts the
bits of the first operand, the second operand
Question 7 1) 2)
Consider the following code: NOT (condtion2) AND NOT condition1 AND condition4
(conditon3) AND NOT (condition2) AND
if (condition 1){
NOT (condition3)
if (condition 2) 3) 4)
condition1 AND condition2 NOT (condition1) AND
{//Statement A } else AND condition condition2 AND NOT
if (condition 3) (condition4)
{//Statement C } else
if (condition 4)
{//Statement D}
else
{//Statement E}
Question 8 1) 2)
a symbol used for grouping ()"" {}
3) 4)
[] ""
Answer: 1
Question 9 1) 2)
Set a=6, b=3 C=2 11 9
a= b+1
print a+b+c
Question 10 1) 2)
int main() 1 0
{
3) 4)
int x=4, y=0; undefined behavior due to compilation error
order of evaluation can be
int z different
z=(y++, y);
Answer: 1
printf("%d\n", z);
return 0:
Question 11 1) 2)
Find the output of following pseudocode 012 020
int main() 3) 4)
022 error
{
Answer: 4
int a=0,b-1,c-2
Question 12 1) 2)
What will be the output of the following code ? 324 315
#include<stdio.h> 3) 4)
320 337
int main()
Answer: 4
{
char c,a,b:
c='f';
a='s';
b='x';
int sum=c+a+b;
printf("%d", sum);
Question 13 1) 2)
Find the output of following pseudo code: differ by 80 same
print a* b/(c-d)
Question 14 1) 2)
#include<stdio.h> 8 5
int main() 3) 4)
13 7
{
Answer: 2
int n-5, k ft, f2 f
if(n<2)
return n;
else
f1=12=1;
for(k=2;k<n;k++)
f = f1 +f2
f1 = f2;
f2 = f
}
printf("%d",f);
Question 15 1) 2)
What will be the output of the following pseudocode? 2 13
Integer a, b, c 3) 4)
26 5
Set b=5, a 2c=2
Answer: 2
if(b>a && a>c && c>b)
b=a+1
Else
a=b+1
End if
Print a+b+c
Question 16 1) 2)
Find the output of following pseudo code: 80 00
int main() 3) 4)
15 4 Error : cant perform operation
{
Answer: 3
int num=8:
return 0:
Question 17 1) 2)
What would be the output of the following pseudocode? 2024/11/27 2 9
Integer i, j, k 3) 4)
7 8
Set k=8
Answer: 2
for(each i from 1 to 1)
print k+1
end for
end for
Question 18 1) 2)
integer a=60, b=35, c=-30 0 and 1 0 and 0
3) 4)
NOT NAND
Answer: 2
Question 20 1) 2)
In which of the following cases inline functions may not word? i) If i, iv iii, iv
the function has static variables. ii) If the function has global and
register variables. iii) If the function contain loops. iv) If the following 3) 4)
is recursive. ii, iii, iv i, iii, iv
Answer: 4
Question 21 1) 2)
Where should default parameters appear in a function prototype? To he rightmost due of the To he leftmost due of the
parameter list parameter list
3) 4)
Anywhere inside the parameter Middle of the parameter list
list
Answer: 1
Question 22 1) 2)
When we define the default values for a function ? When a function is declared When a function is defined
3) 4)
When a function is called When the scope of the function
is over
Answer: 2
Question 23 1) 2)
A labeled statement consist of an identifier followed by ; :
3) 4)
, =
Answer: 2
Question 24 1) 2)
Which of the following can be operands of arithmetic operators? Numeric Boolean
3) 4)
Characters Both Numeric & Characters
Answer: 4
Question 25 1) 2)
Choose a syntax for C Ternary Operator from the list. condition ? expression1 : condition : expression1 ?
expression2 expression2
3) 4)
condition ? expression1 < condition < expression1 ?
expression2v expression2
Answer: 1
Question 26 1) 2)
An inline function is expanded during _______ compile - time run - time
3) 4)
never expanded end of the program
Answer: 1
Question 27 1) 2)
Which of the following feature is used in function is used in function Encapsulation Polymorphism
overloading and function with default argument?
3) 4)
Abstraction Modularity
Answer: 2
Question 28 1) 2)
Choose a statement to use C if Else statement. else if is compulsory to use with else is compulsory to use with if
if statement statement
3) 4)
else or else if is optional with if None of the above
statement
Answer: 3
Question 29 1) 2)
The operator that takes two operators are called Unary operator Binary operator
3) 4)
ternary operator None of them
Answer: 2
Question 30 1) 2)
What is the result of logical or relational expressin in C? True or False 0 or 1
3) 4)
0 if an expression is false and None of the mentioned
any positive number if an
expression is true
Answer: 2
Question 31 1) 2)
Switch statement accepts int char
3) 4)
long All of the above
Answer: 4
Question 32 1) 2)
What happens to a function defined inside a class without any It becomes a virtual function of It becomes a default calling
complex operations (like looping, a large number of lines, etc)? the class function of the class
3) 4)
It becomes an inline function of The program gives an error
the class
Answer: 3
Question 33 1) 2)
What is the output of the C program.?int main(){ int a=0; a=5>2 ? compiler error 14
printf("4"):3;printf("%d",a); return0;}
3) 4)
41 0
Answer: 3
Question 34 1) 2)
Which keyword can be used for coming out of recursion? return break
3) 4)
exit both A and B
Answer: 1
Question 35 1) 2)
Modulus operator, %, can be applied to which of these? Integers Floating - point numbers
3) 4)
Both Integers and floating - None of the mentioned
point numbers
Answer: 3
Question 36 1) 2)
Do logical operator in the language in the C language are evaluated True False
with short circuit?
3) 4)
Depends on the compiler Depends on the standard
Answer: 1
Question 37 1) 2)
Using goto inside for loop is equivalent to using Continue Break
3) 4)
Return None of the above
Answer: 4
Question 38 1) 2)
For loop in a C program, if the condition is missing? it is assumed to be present and it is assumed to be present and
taken to be false taken to the true
3) 4)
it result in a syntax error. execution will be terminated
abruptly
Answer: 2
Question 39 1) 2)
which of the following s an invalid if-else statment> if (if(a==1)){} if(a){}
3) 4)
if((char)(a)){} if (func1(a)){}
Answer: 1
Question 40 1) 2)
what will be the output of the following code? Compile time error hi
void m(int k) 3) 4)
hello hi hello
{
Answer: 2
printf("hi");
void m(double k)
{
printf("hello");
void main()
m(3):
Question 41 1) 2)
whenever a C program is executed ,execution starts from Scanf function Void function
3) 4)
Any function Main function
Answer: 4
Question 42 1) 2)
It is necessary to declare the type of a function in the calling Both B and c is not defined in the same file
program if the function
3) 4)
Returns a non-integer value None
Answer: 3
Question 43 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) One-dimensional array Two-dimensional array
Answer: 4
Question 44 1) 2)
what will be the output of the following java program? 5.640000000000001 5 5.640000000000001 5 0
Class Modulus{ 3) 4)
55 5 5.640000000000001
public stataic void main(String args[])
Answer: 1
{
double a=25.64;
int b=25;
a=a%10;
b=b%10;
System.out.println(a+" "+b);
Question 45 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) One Zero
Question 46 1) 2)
No of values function can return 2 1
3) 4)
3 0
Answer: 2
Question 47 1) 2)
what is th eoutput of a Logical OR(|) operation if one of the false true
inputs/operands is false?
3) 4)
true or false None
Answer: 3
Question 48 1) 2)
what is the output of the Java code snippet? true false
boolean b=false; 3) 4)
Compilation error None
b=!b;
Answer: 1
System.out.println(b);
Question 49 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) if(n){c = a:}else{c = b;} if(!n){c = a:}else{c = b;}
Answer: 1
Question 50 1) 2)
The function that actually created from a call to a template function Generated Inherited
is called
3) 4)
Spawned All of the above
Answer: 3
Question 51 1) 2)
If switch feature is used, then Default case must be present Default, if used, should be the
last case
3) 4)
Default case, if used, can be None
placed anywhere
Answer: 2
Question 52 1) 2)
which among the following is a Short Circuit OR operator? & |
3) 4)
&& ||
Answer: 4
Question 53 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) 1 ,2 & 3 1&4
With x = 0, which of the following are legal lines of Java code for 3) 4)
changing the value of x to 1? 1, 2, 3 & 4 3&2
1.x++; Answer: 4
2.x=x/1;
3.x+=1;
4.x=/1;
Question 54 1) 2)
Decrement operator,--, decreases the value of variable by what 1 2
number?
3) 4)
3 4
Answer: 1
Question 55 1) 2)
Assume the output of the following code: No output main() ids called twice
void main() 3) 4)
Run Time Error Varies
{
Answer: 2
static int x;
if(x++<2)
main();
3) 4)
Multiplication, Addition, Addition, Division, Modulus,
Division, Subtraction Subtraction
Answer: 2
Question 57 1) 2)
How long the following loop runs? For(x=0; x=3;x++) Three times Four times
3) 4)
Forever Never
Answer: 3
Question 58 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) Passed to a function Changed within a function
Answer: 2
Question 59 1) 2)
It is not advisable to use macros instead of functions because it increases the code size no type checking will be done
3) 4)
recursion is not possible All of the above
Answer: 4
Question 60 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) AND OR Exclusive OR
Answer: 4
Question 61 1) 2)
what is the result of logical or relational expression in C? True or False 0 or 1
3) 4)
0 if an expression is false and None
any positive number if an
expression is true
Answer: 2
Question 62 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) Declared Initialized
Answer: 3
Question 63 1) 2)
what will be the output of the following C code? 51 03
#include<stdio.h> 3) 4)
53 11
int main()
Answer: 1
{
b!=!a;
c=!!a;
printf("%d\t%d", b, c);
Question 64 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) int double
What will be the data type returned for the following C function? 3) 4)
char No output
#include
Answer: 1
int func()
return (double)(char)5.0;
}
Question 65 1) 2)
Assume the output of the following code: 10 30 20 20
int a=10;
printf("%d",a);
myshow(&a);
printf("%d",a);
*k=20;
Question 66 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) True False
Answer: 1
Question 67 1) 2)
what is the output of the C program? India Honey
{ 3) 4)
India Compile error
if(TRUE)
Honey
{
ZING
print("India\n");
Answer: 4
}
if(true)
printf(Honey\n");
printf("ZING");
return 0;
Question 68 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) 12345 1234
int k;
for(k=1;k <=5;k++)
printf("%d",k);
return 0;
Question 69 1) 2)
choose a correct option regarding C comparison Operators. (x==y) Is x relly equal to y. (x<y) Is x less than y
3) 4)
(x<=y) Is x less than or equal to All of the baove
y
Answer: 4
Question 70 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) a++ is (a=a/1) POST a-- is (a=a-1) POST DECREMENT
INCREMENT Operator Operator
Choose a correct C statement
3) 4)
++a is (a=a/1) Pre INCREMENT All the above
Operator
Answer: 4
Question 71 1) 2)
If you have to make decision based on multiple choices, which of the if if-else
following is best suited?
3) 4)
if-else-if All of the above
Answer: 3
Question 72 1) 2)
Multiple Choice ( Select 1 out of 4 options for the question below ) True False
Answer: 1
Question 73 1) 2)
What is the output of C Program ? 32 33
3) 4)
30 No output
Answer: 1
int main()
{
int a=32;
do
{
printf("%d",a);
a++;
}while(a<=30);
return 0;
}
Question 74 1) 2)
No of values function can return 2 1
3) 4)
3 0
Answer: 2
Question 75 1) 2)
Which among the following is a Short Circuit OR operator ? & &&
3) 4)
| ||
Answer: 4
Question 76 1) 2)
Which of the following is an invalid if-else statement ? if (if (a == 1)){} if (a){}
3) 4)
if ((char) a){} if (func1 (a)){}
Answer: 1
Question 77 1) 2)
With x=0, which of the following are legal lines of Java code for 1, 2 & 3 1&4
changing the value of x to 1?
3) 4)
advertisement 1, 2, 3 & 4 3&2
See More
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;
Question 78 1) 2)
what will be the output of the following code? Compile time error hi
3) 4)
hello hi hello
Answer: 2
void m(int k)
{
printf("hi");
}
void m(double k)
{
printf("hello");
}
void main()
{
m(3);
}
Question 79 1) 2)
do-while loop terminates when conditional expression returns ? One Zero
3) 4)
None-zero None of the above
Answer: 2
Question 80 1) 2)
Types of function in C language Library Function Both A and C
3) 4)
User defined function None of the above
Answer: 2
Question 81 1) 2)
What is the output of C program ? GREEN RABBIT
Question 82 1) 2)
Modulus operator, %, can be applied to which of these ? Integers Floating -- point numbers
3) 4)
Both Integers and floating -- None of the mentioned
point numbers
Answer: 3
Question 83 1) 2)
What is the output of the Java code snippet ? true false
boolean b=false; 3) 4)
b=!b; Compiler error None of the above
System.out.println(b);
Answer: 1
Question 84 1) 2)
For loop in a C program, if the condition is missing ? it is assumed to be present and it is assumed to be present and
taken to be false taken to the true
3) 4)
it result in a syntax error execution will be terminated
abruptly
Answer: 2
Question 85 1) 2)
What is the output of C program ? 25 25 25 25 26 27
int main() 3) 4)
{ 27 27 27 Compiler error
int a=25;
while(a<=27) Answer: 2
{
printf("%d",a);
a++;
}
return 0;
}
Question 86 1) 2)
Assume the output of the following code: Compile time error Runtime error
#include <stdio.h> 3) 4)
enum m{JAN, FEB, MAR}; 1 0
enum m foo();
int main() Answer: 1
{
enum m i=foo();
printf("%d\n",i):
}
int foo()
{
return JAN;
}
Question 87 1) 2)
What will be the output of the following C++ code ? -5 0
#include <iostream> 3) 4)
using namespace std; 10 5
int fun(int=0, int=0);
int main(){ Answer: 4
cout << fun(5);
return 0;
}
int fun(int x, int y){
return (x + y);
}
Question 88 1) 2)
Which among the following is a logical Unary NOT operator in Java ? ~ !
3) 4)
# ^
Answer: 2
Question 89 1) 2)
What happens to the Second operand / expression if the first Second operand / expression is Evaluation of second operand /
operand is FALSE with a Short Circuit AND (&&) operator ? evaluated and AND is applied. expression is skipped.
3) 4)
The compiler starts taking more The compiler starts taking more
memory. CPU power.
Answer: 1
Question 90 1) 2)
The function that actually created from a call to a template function is Spawned Inherited
called
3) 4)
All of the above Generated
Answer: 1
Question 91 1) 2)
Will the following program run successfully? Yes No
int main() 3) 4)
{ Compile error Syntax error
int n=5:
printf("n=%*d\n", n, n): Answer: 1
return 0:
}
Question 92 1) 2)
Select the output of this program: SDKJNSDNSKDJNSKDVNSKJD SLKFVMSLFVSFLALKDJF
#include<stdio.h> 3) 4)
#include<stdlib.h> ABCDEFGHIJKLMNOPQRSTUVW None of the above
int main(void)
XYZ
{
char x='A' Answer: 3
char*y=(char*)malloc(sizedof(char));
y=&x;
for (int i = 0:i<26:i++){
printf("%c", x):
y[0]+=1:
}
}
Question 93 1) 2)
Find the error, if any, in the following program: No error, No output Program crashes at run time
fclose(fp);
return 0;
}
Question 94 1) 2)
What will be the output of the following program? 11 2 5 11 3 5
3) 4)
Compilation Error None of the above
Answer: 1
class Demo{
public static void main(String[] args)
arr.add(11);
arr.add(2);
arr.add(3);
arr.add(5);
arr.add(7);
arr.remove(new Integer(7)):
arr.remove(2);
for(int i=0;i<arr.size();i++)
System.out.print(arr.get(i)+"");
}
}
Question 95 1) 2)
Which of the following scanf() statement will you use to scan a and scanf("%Lf%Lf",&a,&b); scanf("%f%Lf",&, &b);
b?
3) 4)
float a: scanf("%f%lf",&a,&b); scanf("%f%f",&a,&b);
double b;
Answer: 3
Question 96 1) 2)
Which of the statement is true for the following program? The code copies the content of The code writes strings that are
one file to another read from the keyboard into file
int main()
{ 3) 4)
FILE *fptr;
The code reads a file None of the above
char str[80];
fptr=fopen("f1.dat","w"); Answer: 2
if(fptr==NULL)
printf("Cannot open file");
else
{
while(strlen(gets(str))>0)
{
fputs(str,fptr);
fputs("\n",fptr);
}
fclose(ftpr);
}
return 0:
}
Question 97 1) 2)
What will be the output: int main() gpur agpur
{ 3) 4)
FILE *fp; Nagp agpu
char clt, str[7];
fp=fopen("try.c","r");/"file 'try.c' contains "This is Nagpur" Answer: 2
*/
fseek(fp,9L,SEEK_CUR);
fgets(str,5,fp);
puts(str);
return 0;
}
Question 98 1) 2)
Select the output of 'file.c' after the execution of the following B AB
program:
3) 4)
BB Error
Answer: 2
int main()
{
FILE*fp1, *fp2:
fp1=fopen("file.c","w"):
fp2=fopen("file.c", "w"):
fputc('A',fp1);
fputc('B',fp2);
fclose(fp1);
fclose(fp2);
return 0:
}
Question 99 1) 2)
To print out a and b given below, which of the following printf() printf("%f%lf", a, b) printf("%Lf%f", a, b)
statement will you use?
3) 4)printf("%Lf%Lf", a, b)
float a=3.14: printf("%f%Lf", , b)
double b=3.14;
Answer: 1
Question 100 1) 2)
If the following program contains a line "Be my Friend" in the Friend fren
'source.txt' then whaat will be the output?
3) 4)
end Error
Answer: 3
Question 101 1) 2)
Which statement is used to close the IF block? ELSEIF ELSE
3) 4)
ENDIF END
Answer: 3
Question 102 1) 2)
Point out the error in the following code: Error; unknown file pointer Error: in unsigned char
statement
int main()
{ 3) 4)
unsigned char:
No error None of the above
FILE *fp;
fp=fopen("trial","r"): Answer: 1
if(!fp)
{
print("Unable to open file"):
exit(1):
}
fclose(fp);
return 0;
}
Question 103 1) 2)
Consider address of x as 62fe14 and identify the output: 0x62fe14 0x62fe14 0x62fe14 0x62fe15
#include<stdio.h> 3) 4)
int main(void) Crash 0x00 10 0x1902
{
int a=100; Answer: 1
char*x=(char*)&a;
char**y=&x;
y[0]=(char*)0x62fe14;
printf("%x\n",x);
printf("%x","y");
}
Question 104 1) 2)
Pick the correct statement for the following program; The code reads a text files and The code writes a text to a file in
display its context in reverse reverse order
int main()
order
{
FILE *fp;
3) 4)
char str[11], ch:
The code writes a text to a file None of the above
int i=0:
fp=fopen("INPUT.TXT","r");
Answer: 1
while((ch=getc(fp))!=EOF)
{
if(ch=='\n\ || ch == '')
{
str[i]='\0\;
strrev(str);
printf("%s",str);
i=0;
}
else
str[i++]=ch;
}
fclose(fp);
return 0;
}
Question 105 1) 2)
Which of the following statements instructs the computer to get read READ
value from an input device and store it in a memory location?
3) 4)
write WRITE
Answer: 2
Question 106 1) 2)
What will be printed after the execution of this pseudocode? karnataka kerala
#include<stdio.h> 3) 4)
int main(void) Kerala Karnataka
{
int a=(int)0b01001011; Answer: 4
int*b=&a;
int n[10]={(int)0b010110, 17, -4, -13, 19, -19, 10,
(int)0b11110110};
for (int i=0;i<9;i++){
printf("%c",b[0]);
b[0]+=n[i];
}
}
Question 107 1) 2)
A file contains the line "I am a man\r\n" then on reading this line into "I am a man\r\()" "I am a man\rr\()"
the array str using fgets(). What will str contain?
3) 4)
"I am a man" "I am a man\r\n\()"
Answer: 2
Question 108 1) 2)
Select the alternate notation for exponentiation. ** *
3) 4)
*** *^
Answer: 1
Question 109 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) 51 03
int a=10,b=5,c=3;
b !=!a;
c =!!a;
printf("%d\t%d". b.c);
Question 110 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Three times Four times
Answer: 3
Question 111 1) 2)
choose correct statement regarding C Comparison Operators (x==y) Is x really equal to y (x<y) Is x less than y
3) 4)
(x<=y) Is x less than or equal to All of the above
y
Answer: 4
Question 112 1) 2)
what will be the data type returned for the following C dunctions? int double
#include 3) 4)
char No output
int func()
Answer: 1
{
return (double)(char)5.0;
Question 113 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) True or False 0 or 1
Answer: 2
Question 114 1) 2)
It is not advisable to use macros instead of functions because it increases the code size no type checking will be done
3) 4)
recursion is not possible All of the above9
Answer: 4
Question 115 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) True False
Answer: 1
Question 116 1) 2)
Prior to using a pointer variable it should be Declared Initialized
3) 4)
Both declared and Initialized None
Answer: 3
Question 117 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) 12345 1234
int k;
for(k=1;k<=5;k++)
printf("%d",k);
return 0;
Question 118 1) 2)
Choose a correct C statement a++ is (a=a+1) POST a-- is (a=a-1) POST DECREMENT
INCREEMENT Operator Operator
--a is (a=a-1) PRE DECREMENT
Operator
3) 4)
++a is (a=a+1) PRE INCREMENT All the above
Operator
Answer: 4
Question 119 1) 2)
Assume the output of the following code: No output main is called twice
void main() 3) 4)
Run time error varies
{
Answer: 2
static int x;
if(x++<2)
main();
Question 120 1) 2)
Are logical operator sequence oints? True False
3) 4)
Depends on the compiler Depends on the standard
Answer: 1
Question 121 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) 10 30 20 20
int a=10;
printf("%d",a);
myshow(&a);
printf("%d",a);
*k=20;
Question 122 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Passed to a function Changed within a function
Answer: 2
Question 123 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) AND OR Exclusive OR
Answer: 4
Question 124 1) 2)
what is the output of the C program? India Honey
{ 3) 4)
India Compile error
if(TRUE)
Honey
{
ZING
printf("India\n");
Answer: 4
}
if(true)
printf("Honey\n");
printf("ZING");
return 0;
Question 125 1) 2)
If you have to make decision based on multiple choices, which of the if if-else
following is best suited?
3) 4)
if-else-if All of the above
Answer: 3
Question 126 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Addition, Subtraction, Division, Multiplication,
Multiplication, Division Addition, Subtraction
In mathematics and computer programming, which is the correct
order of mathematical operator? 3) 4)
Multiplication, Addition, Addition, Division,
Division, Subtraction Modulus,Subtraction
Answer: 2
Question 127 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Character Integer
3) 4)
Float enum
Which of the following cannot be checked in a switch-case Answer: 3
statement?
Question 128 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) & &&
Answer: 1
Question 129 1) 2)
which for loop has range of similar indexes of 'i' used in for( i=0 ; i<n for (i=n;i>0;i--) for (i=n;i>=0;i--)
; i++)?
3) 4)
for ( i=n-1 ; i>0 ; i-- ) for ( i=n-1 ; i>-1 ; i-- )
Answer: 4
Question 130 1) 2)
In C parameters are always Passed by value Passed by reference
3) 4)
Non-pointer variables are Passed by value result
passed by value and pointers
are passed by reference
Answer: 3
Question 131 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Infinite times 32767 times
main();
return 0
Question 132 1) 2)
what is the limit for number of functions in a C program? 16 32
3) 4)
31 No limit
Answer: 4
Question 133 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) true false
Answer: 1
Question 134 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) 1 2
Decrement operator, a=a-- decreases the value of varibale by what
3) 4)
number?
3 4
Answer: 1
Question 135 1) 2)
Which of these statements are incorrect? Assignment operators are more Assignment operators run faster
efficiently implemented by java then their equivalent long forms
run-time system than their
equivalent long forms
3) 4)
Assignment operators can v=be None
used only with numeric and
character data type
Answer: 4
Question 136 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) "main" is the name of default main() is same as int main()
must and should Function
Choose a correct statement about C function?
void main() { 3) 4)
By default return 0 is added as All the above
print("Hello"); the last statement of a function
} without specific return type
Answer: 4
Question 137 1) 2)
output of the following code? 23 compile error
# include <stdio.h> 3) 4)
43 32
void dynamic(int s,...)
Answer: 1
{
print("%d",s);
int main()
dynamic(2,4,6,8);
dynamic(3,6,9);
return 0;
Question 138 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) true false
Answer: 1
Question 139 1) 2)
Output of the following code? Address of main function Compile error
#include<stdio.h> 3) 4)
Runtime error Some random value
int main()
Answer: 4
{
printf("%d",main);
return 0;
Question 140 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) AND NOT
Answer: 4
Question 141 1) 2)
The C code 'for(;;)' represents an infinite loop. It can be terminated break exit(0)
by____________
3) 4)
abort() terminate
Answer: 1
Question 142 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) Comparision Operator If-Els Operator
Answer: 4
Question 143 1) 2)
what is result after execution of the folllowing code is as is 10, b is 5 a=10,c=10 a=11,c=10
and c is 10?
3) 4)
if((a>b) && (a<=c)) a=10,c=11 a=11,c=11
a=a+1; Answer: 2
else
c=c+1;
Question 144 1) 2)
Multiple Choice ( Select 1 out of 4 options, for the question below. ) ekse if is compulsory to use with else is compulsory to use with if
if statement statement
Choose a statement to use C If Else statement
3) 4)
else or else if is optional with if None of the above
statement
Answer: 3