Tuesday, 14 June 2016

Looking for MS in USA, GRE , TOFEL & US VISA Be Careful ! Learn to write computer programs

Nearly 25 of the 60 students in the program must leave. It is because they were unable to write computer programs, a necessary part of the curriculum and a skill that United States schools teach to undergraduates. So students be careful it will be applied to other universities in US as well in the near future.
Learn C skills, write programs and get programming skills required for US universities.

Sunday, 10 April 2016

Model Papers for Interview of companies like Cisco, Global Edge, Smart play, Sasken, Broadcom, Qualcomm and more....

Model Paper 1

1) Who is father of C Language?
A. Bjarne Stroustrup
B. Dennis Ritchie
C. James A. Gosling
D. Dr. E.F. Codd

2) C Language developed at _____?
A. AT & T's Bell Laboratories of USA in 1972
B. AT & T's Bell Laboratories of USA in 1970
C. Sun Microsystems in 1973
D. Cambridge University in 1972

3)  For 16-bit compiler allowable range for integer constants is ______ ?
A. -3.4e38 to 3.4e38
B. -32767 to 32768
C    -32768 to 32767
D. -32668 to 32667

4)  C programs are converted into machine language with the help of
A. An Editor
B.  A compiler
C. An operating system
D. None of the above

5)  A C variable cannot start with
A. An alphabet
B. A number
C. A special symbol other than underscore
D. both (b) and (c)

6)  Which of the following is allowed in a C Arithmetic instruction
A. []
B. {}
C.  ()
D. None of the above

7) Which of the following shows the correct hierarchy of arithmetic operations in C
A. / + * -
B. * - / +
C. + - / *
D. * / + -

8) What is an array?
A. An array is a collection of variables that are of the dissimilar data type.
B. An array is a collection of variables that are of the same data type.
C. An array is not a collection of variables that are of the same data type.
D. None of the above.

9) What is right way to Initialization array?
A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;
B. int n{} = { 2, 4, 12, 5, 45, 5 } ;
C. int n{6} = { 2, 4, 12 } ;
D. int n(6) = { 2, 4, 12, 5, 45, 5 } ;

10) An array elements are always stored in _________ memory locations.
A. Sequential
B. Random
C. Sequential and Random
D. None of the above

11) Bitwise operators can operate upon?
       A.  double and chars
B. floats and doubles
C. ints and floats
D. ints and chars

 12) What is C Tokens?
A. The smallest individual units of c program
B. The basic element recognized by the compiler
C. The largest individual units of program
D. A & B Both

13) What is Keywords?
A. Keywords have some predefine meanings and these meanings can be changed.
B. Keywords have some unknown meanings and these meanings cannot be changed.
C. Keywords have some predefine meanings and these meanings cannot be changed.
D. None of the above

14) What is constant?
A. Constants have fixed values that do not change during the execution of a program
B. Constants have fixed values that change during the execution of a program
C. Constants have unknown values that may be change during the execution of a program
D. None of the above

15) What is the right way to access value of structure variable book{ price, page }?
A. printf("%d%d", book.price, book.page);
B. printf("%d%d", price.book, page.book);
C. printf("%d%d", price..book, page..book);
D. printf("%d%d", price->book, page->book);

16) perror( ) function used to ?
A.Work same as printf()
B. prints the error message specified by the compiler
C. prints the garbage value assigned by the compiler
D. None of the above

17)Which is the right way to declare constant in C?
A.int constant var =10;
B. int const var = 10;
C. const int var = 10;
D. B & C Both

18) Which operators are known as Ternary Operator?
A. .., ?
B. ?, .
C. ?, ;;
D. None of the above

19) In switch statement, each case instance value must be _______?
A. Constant
B. Variable
C. Special Symbol
D. None of the above

20) What is the work of break keyword?
A. Halt execution of program
B. Restart execution of program
C. Exit from loop or switch statement
D. None of the above

21) What is function?
A. Function is a block of statements that perform some specific task.
B. Function is the fundamental modular unit. A function is usually designed to perform a specific task.
C. Function is a block of code that performs a specific task. It has a name and it is reusable
D. All the above

22) Which one of the following sentences is true?
A. The body of a while loop is executed at least once.
B. The body of a do ... while loop is executed at least once.
C. The body of a do ... while loop is executed zero or more times.
D. A for loop can never be used in place of a while loop.

23) A binary tree with 27 nodes has _______ null branches.
A. 54
B. 27
C. 26
D. None of the above

24) Which one of the following is not a linear data structure?
A. Array
B. Binary Tree
B. Queue
D. Stack

25) Recursive functions are executed in a?
A. First In First Out Order
B. Load Balancing
C. Parallel Fashion
D. Last In First Out Order

26) Queue is a _____________ list.
A. LIFO
B. LILO
C. FILO
D. FIFO

27) The statement print f ("%d", 10 ? 0 ? 5 . 1 . 12); will print?
A. 10
B. 0
C. 12
D. 1

28) To represent hierarchical relationship between elements, which data structure is suitable?
A. Priority
B. Tree
C. Dqueue
D. All of the above

29) Which of the following data structure is linear type?
A. Strings
B. Queue
C. Lists
D. All of the above

30) The statement printf("%c", 100); will print?
A. prints 100
B. print garbage
C. prints ASCII equivalent of 100
D. None of the above

see more at below link...

Friday, 11 September 2015

Embedded System Concepts


1. What is an Embedded System? Give some examples of
embedded system in daily life.

Ans. Embedded System is a system which hides a small computation unit inside. This computer is not general purpose computer like our Desktop PC but a small micro controller or microprocessor. Embedded System is designed to perform specific tasks. Best example of an Embedded System is our mobile phone which includes a processing unit or no. of processing units along with peripherals like keypad/touchpad, touch screen, LCD, Communication modules etc.
There are other examples like Electronic System in washing machine, ATM machine, front panel of Microwave oven, printers, TV, set top boxes, Remote control, Dashboard of a 4-wheeler and many more. If you observe carefully we are surrounded by a no. of embedded system and use them very frequently in our day to day life.

2. What are basic features of an Embedded System?
Ans. A good embedded system must possess following features…
• Microcontroller based
• Software driven
• Reliable
• Real time control system
• Autonomous and human interactive
• Operating on diverse physical variables
• Operating in diverse environments

3. What are various categories of an Embedded System based on complexity?
Ans. Embedded Systems can be broadly classified in three categories…
a. Small Scale – 8/16 bit CPU, little hardware, less software
complexity, no RTOS, battery operated.
b. Medium scale – 16/32 bit uC or DSPs, Complex hardware and
software design, RTOS source code engg tool, IDE.
c. Sophisticated – Configurable processors, Cutting edge applications, highly complex hardware and software design.

4. Why PC can’t be treated as an Embedded System?
Ans. Of course PC is also embedded with a processing unit but still it can not be called as an Embedded System. The reason is very clear that PC is not supposed to do a specific task. For a bank employee PC is accounting add for his work while for an engineer it is designs add. For a doctor PC helps to analyze patient reports and for children it’s more like video game or a communication system to stay connected with their friends through social networking websites. Hence PC has different applications for different people; hence it cannot be treated as an
embedded system.

5. What is difference between a PC based System and an Embedded System?
Ans. A PC based system is bulky hence difficult to be deployed specially in remote areas. For example if one wants a data logger system to monitor all the processes and events in an aircraft or on a hilly area, PC is never a suitable option. In this case an Embedded System can do the job well consuming very small space. Also PC based system are not so cost efficient and as reliable as embedded systems.

6. Ok if embedded systems are so important and popular than why PCs still exist, why can’t we use embedded systems instead of PCs?
Ans. Well PC works with operating systems and they support comprehensive cross compilers for generating executable files for embedded systems. Hence we can never ignore the importance of PCs.

7. What are the main components of an Embedded System?
 
see more at below link...

Wednesday, 19 August 2015

Write a program to reverse the digits of a given integer, factorial of a number, sum of digits of a given number and multiplication table ?

Write a program to reverse the digits of a given integer, factorial of a number, sum of digits of a given number and multiplication table ?
1.Program to print multiplication table
‪#‎include‬ < stdio.h > 
int main() 
{ 
int i,j,n,m; 
int a[50],b[50]; 
printf("enter the number\n"); 
scanf("%d",&n); 
printf("enter the size of table\n"); 
scanf("%d",&m);
for(i=1,j=1;i<=m;i++,j++) 
{ 
b[j]=(n * i); 
printf("%d X %d = %d",n,i,b[j]);
Please look more at the below link.....
http://www.epistemesoft.com/Articles.aspx

Saturday, 8 August 2015

Types of IPC's in Linux

Inter-Process-Communication (or IPC for short) are mechanisms provided by the kernel to allow processes to communicate with each other. On modern systems, IPCs form the web that bind together each process within a large scale software architecture.
The Linux kernel provides the following IPC mechanisms:
Signals 
Anonymous Pipes 
Named Pipes or FIFOs 
SysV Message Queues 
POSIX Message Queues 
SysV Shared memory 
POSIX Shared memory 
SysV semaphores 
POSIX semaphores 
FUTEX locks 
File-backed and anonymous shared memory using mmap 
UNIX Domain Sockets 
Netlink Sockets 
Network Sockets

Usage of Linux Signal handler

Definition 
• A signal is an asynchronous event which is delivered to a process. 
• Asynchronous means that the event can occur at any time 
- may be unrelated to the execution of the process 
- E.g. user types ctrl-C or the modem hangs
Name Description Default Action 
SIGINT Interrupt character typed terminate process 
SIGQUIT Quit character typed (^\) create core image 
SIGKILL kill -9 terminate process 
SIGSEGV Invalid memory reference create core image 
SIGPIPE Write on pipe but no reader terminate process 
SIGALRM alarm() clock ‘rings’ terminate process 
SIGUSR1 user-defined signal type terminate process 
SIGUSR2 user-defined signal type terminate process
Generating a Signal 
• Use the UNIX command: 
$ kill -KILL 4481 
– send a SIGKILL signal to pid 4481 
– check 
? ps –l 
– to make sure process died 
• kill is not a good name; send....
Please look more at below link...
http://www.epistemesoft.com/Ariticle%20more.aspx…

Types of Linux Sockets

Sockets allow communication between two different processes on the same or different machines. To be more precise, it's a way to talk to other computers using standard Unix file descriptors. In Unix, every I/O action is done by writing or reading a file descriptor. A file descriptor is just an integer associated with an open file and it can be a network connection, a text file, a terminal, or something else.
To a programmer, a socket looks and behaves much like a low-level file descriptor. This is because commands such as read() and write() work with sockets in the same way they do with files and pipes.
Where is Socket Used?
A Unix Socket is used in a client-server application framework. A server is a process that performs some functions on request from a client. Most of the application-level protocols like FTP, SMTP, and POP3 make use of sockets to establish connection between client and server and then for exchanging data.
Syntax:
int socket(int domain, int type, int protocol)

Here., Domain refers to: Socket Family
Ex:AF_UNIX,AF_INET ,AF_NETLINK etc.
Protocol refers to: The type of Protocol we want to use
Ex:TCP,UDP,ICMP etc.
Type refers to: Socket Service Type

Socket Service Types:

The following socket types are.....
http://www.epistemesoft.com/Ariticle%20more.aspx…