Global Edge - Computerfundamental
Global Edge - Computerfundamental
12. 8085 is
1. 16-bit
2. 8-bit
3. 32-bit
4. 20-bit microprocessor.
Ans : 2. 8 bit
1) main(){
int a;
char *p;
a = sizeof(int) * p;
printf("%d
",a);
}
a) compile error
b) run time error
c) 4
d) compiler dependent
ans:a
3) int (*fun())[]
a) function returning a pointer to an array
b) function returning an array of pointers
c) pointer to a funtion which takes array as asrument
d) Compiler error
ans: a
4) main(){
int a=8,d;
int *p;
p=&a;
d=a/*p;
print("%d
",d);
}
a) 1
b) 0
c) compiler error
d) run time error
ans: c
5) main(){
char *a="Hello";
*a++ = h ;
printf("%s
",a);
}
a) hello
b) ello
c) runtime error
d) compiler error
ans:b
6) main(){
char p[]="Hello";
p[0]= h ;
printf("%s
", p);
}
a) hello
b) Hello
c) compiler error
d) run time error
ans:a
9)main(){
int i=-1;
i<<=2;
printf("%d
",i);
}
a) -1
b) -2
c) -4
d) 0
ans:c
10) main(){
int i= 0xffffffff;
printf("%d
",i);
}
note: size of int is 4 bytes
a) -1
b) 65635
c) 100
d) error
ans:a
C questions
1>
int A=1,B=2;
if(A==B < printf("Hello "))
printf("world
");
else
printf("Bangalore
");
a> world b> Hello bangalore c> bangalore d> Hello world.
2>
main()
{
int i;
for(i=0; i< 10; i++)
{
int j=10;
j++;
printf("j= %d
", j);
}
}
what is o/p ?
a> 10 to 19
b> error j undeclared
c> 10 times 11
d> 10 - 18
ans> c> 10 times 11.
3>
union test{
int a;
union test *p;
};
main(){
union test q;
printf(" a= %d
", q.a);
}
what is o/p?
a> 0
b> syntax error
c> garbage value
d>run time error
ans > c
4>
register int a,b;
main(){
for(a=0 ; a<5 ; a++)
b++;
}
a> 5
b> 4
c> 0
d> error
ans > d
main(){
int i=10,j=2;
dprint(i / j) ;
}
ans > b.
ans> d
ans> d
a> premption
b> sleep
c> creation
d> ready
ans> a
5> Which addressing scheme is not common for 8085 & 8086
Ans: b
1. main()
{
int *p ;
p=(int *)malloc(-10);
}
a) allocates 0 bytes
b) allocates memory, if available
c) compilation error
d) Runtime error
Ans) b
2. main()
{
for( printf("a") ; printf("b") ; printf("c") ) ;
}
a) abc
b) abc abc abc .....(infinite times)
c) a bc bc bc ....(infinite times)
d) Error
Ans) c
3. main()
{
int i= 10 * fun() ;
printf("%d",i);
}
fun()
{
return 10 ;
}
a) 0
b) 10
c) 100
d) Error
Ans) c
4.
int i= 10 * fun() ;
main()
{
printf("%d",i) ;
}
fun()
{
return 10 ;
}
a) 0
b) 10
c) 100
d) Error
Ans) d
main()
{
int i = 100 ;
printf("%d ", sizeof(i++));
printf("%d ",i) ;
}
a) 2 100
b) 2 101
c) 100 101
d) 101 100
Ans) a
Computer Fundamentals :
1. Which one of the following always resides in the memory ?
a) Linker
b) Loader
c) Compiler
d) All of the Above
Ans) b
a) Application layer
b) Network Layer
c) Internet Layer
d) Data Link Layer
Ans) c
3. Which one of the following data structures is best suited for searching ?
a) Arrays
b) Singly Linked List
c) Doubly Linked List
d) Hash Table
Ans) d
Ans) c
a) Last-Come-First-Serve Scheduling
b) First-Come-First-Serve Scheduling
c) Preemptive Scheduling
d) Round Robin Scheduling
Ans) a
6. Demand Paging is
Ans) c
7. Page Fault is
Ans) a
8. If the number of internal nodes in a binary tree is n , then what is the number of external nodes ?
a) n -1
b) n
c) n + 1
d) 2n
Ans) c
a) Deadlock Detection
b) Deadlock Avoidance
c) Deadlock Prevention
d) All of the above
Ans) b
10. Which of the following is used fro designing a lexical analyser of a compiler ?
a) Finite Automata
b) Push Down Automata
c) Turing Machine
d) None of the above
Ans) a
11. Which layer in the OSI model is responsible for End to End connectivity ?
Ans) c