For the below written test answer I defined with "*" at the end of the options
NULL is
- the same as 0 for integer
- the same as blank for character *
- the same as 0 for integer and blank for character
- the same as 0 for integer and blank for character
The basic function of ____________ is to search for files(or other units of text) that contain a pattern.
- awk *
- search
- cat
- cmp
What will be the output of the program?
class SSBool
{
public static void main(String [] args)
{
boolean b1 = true;
boolean b2 = false;
boolean b3 = true;
if ( b1 & b2 | b2 & b3 | b2 ) /* Line 8 */
System.out.print("ok ");
if ( b1 & b2 | b2 & b3 | b2 | b1 ) /*Line 10*/
System.out.println("dokey");
}
}
- ok
- dokey *
- No output is produced
- Compilation error
What does the literal “$?” mean in Shell script?
- Exit status of the previous command executed
- Exit status of the last command executed *
- Exit status of the first command executed
- Exit status of the last command failed
If 10 bulls can plough 20 identical fields in 3 days working 10 hours a day, then in how many days can 30 bulls plough 32 same identical fields working 8 hours a day?
- 2 *
- 4
- 8
- 10
What will be the output of the following query? SELECT DECODE(TRANSLATE('A','1234567890','1111111111'),'1','YES', 'NO' ) from DUAL;
- NO *
- YES
- 1234567890
- 1111111111
Table Employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE. The SQL statement prints? SELECT COUNT(*) FROM Employee WHERE SALARY > ANY (SELECT SALARY FROM Employee);
- 10
- 9 *
- 1
- 0
What is the output of the following program?
x = 3; y = 5; z = 10;
if [( $x -eq 3 ) -a ( $y -eq 5 -o $z -eq 10 )]
then
echo $x
else
echo $y
fi
- 1
- 3
- 5
- Error *
A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train?
- 120 metres
- 180 metres
- 324 metres
- 150 metres *
Predict output of the following program
#include
typedef struct film{
int size;
int pixel;
float price;
}xyz,pqr;
struct film *jadu(){
static xyz one={231,12,900.0},*p=&one;
return p;
}
int main(){
pqr *ptr;
ptr=jadu();
printf("%d",ptr->pixel);
return 0;
}
- 231
- 12 *
- 900.0
- Compilation error
What will be the output of the following query? SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '*'),'','TROUBLE') FROM DUAL;
- ATHEN
- **ATHEN
- ATHEN***
- None of the above *
How will you list all the files within a directory including hidden files aka (.) dot files?
- ls –a *
- ls –h
- ls –q
- ls –t
How to make any script file executable?
- $chmod 655 *.sh
- $chmod 765 *.sh
- $chmod 755 *.sh *
- $chmod 754 *.sh
How to find current running processes in Unix server?
- $ ps –ef *
- $ ds –ef
- $ du –ef
- $ ls –ef
Bottom of Form
The least significant bit of the binary number, which is equivalent to any odd decimal number is
- 0
- 1 *
- 1 or 0
- None
Which OSI layer is responsible for Encryption and Decryption?
- A) Network Layer *
- A) Network Layer
- C) Data Link Layer
- D) Presentation Layer
Which of the following memories has the shortest access time?
- Cache memory *
- . Magnetic Bubble memory
- Magnetic core memory
- RAM
Expand the following abbreviation – USB?
- a) Universal sequence bit
- b) Universal serial bus *
- c) Universal sequence byte
- d) Unique serial bit
How many times printf() will be executed in the below mentioned program? main() { int i; for (i = 0; i < 4; i++) fork(); printf(“my pid = %d\n”, getpid()); }
- 4
- 8
- 16 *
- 32
What will be the output of the below program?
#include
int main(){
int far *p=(int *)0X70230000;
int far *q=(int *)0XB0210000;
int near *x,near*y;
x=(int near *)p;
y=(int near *)q;
if(x==y)
printf("Both pointer are equal");
else
printf("Both pointer are not equal");
return 0;
}
- Both pointers are equal
- Both pointer are not equal
- Segmentation fault
- Compilation error *
What is the difference between linux file system and windows file system?
- A) Under Linux, the various partitions are detected at boot and assigned a drive letter whereas Under windows, unless you mount a partition or a device, the system does not know of the existence of that partition or device. *
- B) Under Windows, the various partitions are detected at boot and assigned a drive letter whereas Under Linux, unless you mount a partition or a device, the system does not know of the existence of that partition or device
- C) Under Windows, the various partitions are detected at reboot and assigned a drive letter whereas Under Linux, unless you mount a partition or a device, the system does not know of the existence of that partition or device
- D) Under Windows, the various partitions are detected at reboot and assigned a drive letter whereas Under Linux, you mount a partition or a deviceBottom of Form
A bitwise operation 'f' has an interesting characteristic, such that, if f(a,b) = c, it always turns out to be the case that f(b,a) = c; f(a,c) = b; f(c,a) = b; f(b,c) = a; f(c,b) = a.
- a) Which of these functions could 'f' possibly be?
- f(a,b) = a XOR b *
- f(a,b) = a + b
- f(a,b) = a - b
- f(a,b) = a * b
the following crontab file entry
0 17 * * 1,2,3,4,5 /usr/sbin/ckbupscd >/dev/console 2>1
The above entry says to run /usr.. at what time
- 17 mins pass midnight
- 5 pm on weekday of each month *
- Midnight on the 17 day of each month
- On the 17 day of each month at 1,2,3,4 and 5 pm
How would you sort a file called shopping on column 3?
- A) Sort –n 3 shopping
- B) Sort –K 3 shopping *
- C) Sort –c 3 shopping
- D) Sort –c3 shopping
What is the output of following program?
#include
void print(int n, int j)
{
if (j >= n)
return;
if (n-j > 0 && n-j >= j)
printf("%d %d\n", j, n-j);
print(n, j+1);
}
int main()
{
int n = 8;
print(n, 1);
}
- 1 7 2 6 3 5 4 4 4 4 *
- 1 7 2 6 3 5 4 4
- 1 7 2 6 3 5
- 1 2 3 4 5 6 7 8
What is 2NF in normalization?
- A) if the domain of each attribute contains only atomic (indivisible) values, and the value of each attribute contains only a single value from that domain.[
- if all the attributes in a table are determined only by the candidate keys of that table and not by any non-prime attributes
- If no non-prime attribute is dependent on any proper subset of any candidate key of the table *
- D) None of above
A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train?
- 120 metres
- 180 metres
- 324 metres
- 150 metres *
Predict the output of the following program
#include
usingnamespacestd;
intmain()
{
constchar* p = "12345";
constchar**q = &p;
*q = "abcde";
constchar*s = ++p;
p = "XYZWVU";
cout << *++s;
return0;
}
- a
- c
- b
- D) Garbage value *
Predict output of the following program
#include
using namespace std;
class Test
{
protected:
int x;
public:
Test (int i):x(i) { }
void fun() const { cout << "fun() const " << endl; }
void fun() { cout << "fun() " << endl; }
};
int main()
{
Test t1 (10);
const Test t2 (20);
t1.fun();
t2.fun();
return 0;
}
- Compilation error
- fun() fun()
- fun() const fun()
- fun() fun() const *
What does the following query find?
(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'red')
MINUS
(SELECT DISTINCT r.sid
FROM boats b, reserves r
WHERE b.bid = r.bid
AND b.color = 'green');
- Find the sailor IDs of all sailors who have reserved red boats but not green boats
- Find the sailor IDs of atleast one sailor who have reserved red boats but not green boats *
- Find the sailor IDs of at most one sailor who have reserved red boats but not green boats
- None of the above
Size of IPv6 address is
- 4 bytes
- 8 bytes
- 6 bytes
- 16 bytes *
What is the probability of getting a sum 9 from two throws of a dice?
- 1/6
- 1/8
- 1/9 *
- 1/12
What will be output of following program?
#include
int main(){
static int a=25;
void cdecl conv1() ;
void pascal conv2();
conv1(a);
conv2(a);
return 0;
}
void cdecl conv1(int a,int b){
printf("%d %d",a,b);
}
void pascal conv2(int a,int b){
printf("\n%d %d",a,b);
}
- 25 0 0 25
- 25 25
- Error will occur *
- 25 -99999999 -99999999 25
Which command puts a script to sleep untill a signal is received?
- sleep
- suspend *
- disown
- break