Asim
HUSANOVIĆ
admin
Bash
2012.07.01 17:51:06

Recursive grep:

grep -rn pattern /path/

 

Find open port and forse close:

Find:

netnetstat -apn |grep 8080

Kill:

lsof -i tcp:8080



Tags: bash | sh | ksh | linux | unix | grep | port

Comments 1 | Hits: 957 | Read more...


 
admin
NVIDIA Interview Question for Software Engineer in Tests
2012.06.29 12:45:19

Give output for for the following code

#include
#include
 
int main(int argc, char *argv[])
{
int i=5;
printf("%d ", i++ + ++i);
printf("%d ", i++ + ++i + i++ + ++i);
printf("%d ", ++i + i++ + ++i + i++);
 
system("PAUSE"); 
return 0;
}

Answer:

#include
#include
 
int main(int argc, char *argv[])
{
int i=5;
printf("%d ", i++ + ++i); // 5 + 1 + 5 + 1 = 12 (i=7)
printf("%d ", i++ + ++i + i++ + ++i); // 7 + 1 + 7 + 8 + 1 + 9 + 1 + 1 = 33 (i=11)
printf("%d ", ++i + i++ + ++i + i++); // 1 + 11 + 12 + 1 + 12 + 12 + 1 = 50 (i=15)
 
system("PAUSE"); 
return 0;
}

 



Tags: linux | windows | c/cpp

Hits: 1993 | Read more...


 
Page 5 of 6
«StartPrev123456NextEnd»
IDOBlog - blog for joomla 1.5