Académique Documents
Professionnel Documents
Culture Documents
A.
* (asterisk)
B.
| (pipeline)
C.
- (hyphen)
D.
_ (underscore)
B.
No
Yes
#include<stdio.h>
int main()
{
int x;
for(x=-1; x<=10; x++)
{
if(x < 5)
continue;
else
break;
printf("IndiaBIX");
}
return 0;
}
A.
Infinite times
B.
11 times
C.
0 times
D.
10 times
4.
&
B.
&&
C.
||
D.
5.Which of the following is the correct order of evaluation for the below expression?
z=x+y*z/4%21
A.
*/%+-=
B.
=*/%+-
C.
/*%-+=
D.
*%/-+=
B.
a>b ? c=30;
C.
D.
return (a>b)?(a:b)
7.The keyword used to transfer control from a function back to the calling function is
A.
switch
B.
Goto
C.
go back
D.
Return
#include<stdio.h>
int main()
{
printf("IndiaBIX");
main();
return 0;
}
A.
Infinite times
B.
32767 times
C.
65535 times
D.
char *p;
p = (char*) malloc(100);
A.
char p = *malloc(100);
B.
C.
char *p = (char*)malloc(100);
D.
int (*ptr)[10];
A.
B.
C.
D.
11.What will happen if in a C program you assign a value to an array element whose subscript exceeds the
size of array?
A.
B.
C.
D.
12.If the two strings are identical, then strcmp() function returns
A.
-1
B.
C.
D.
Yes
remove(var-name);
B.
free(var-name);
C.
delete(var-name);
D.
dalloc(var-name);
B.
C.
D.
15.What is the purpose of "rb" in fopen() function used below in the code?
FILE *fp;
fp = fopen("source.txt", "rb");
A.
B.
C.
D.
None of above
#include<stdio.h>
int main()
{
FILE *fp;
fp=fopen("trial", "r");
return 0;
}
A.
B.
A structure which contains a char pointer which points to the first character of a file.
C.
D.
#include<stdio.h>
int main()
{
int y=128;
const int x=y;
printf("%d\n", x);
return 0;
}
A.
128
B.
Garbage value
C.
Error
D.
B.
C.
D.
#include<stdio.h>
int main()
{
int x=40;
{
int x=20;
printf("%d",x);
}
printf("%d",x);
return 0;
}
A.40 40
B.20 40
C.40 20
D.compilation error
20.when we use the case control structure?
A. To choose one from multiple alternatives
B. To switch from one instruction to another
C. To make the execution fast
D. None of the above