Embedded System QA II

Embedded system Q and A


1. what is difference between microprocessor and microcontroller?

microprocessor microcontroller
The microprocessor is having less in built memory and no inbuilt peripherals like ADC, SPI, IIC, UART, etc. The microcontroller is having more memory and inbuilt peripherals like ADC, IIC, SPI, UART.
The microcontroller is used to build embedded system with less external interfaces. The microprocessor is used to build general purpose computer.
The microcontroller cost is less. The microprocessor cost is more.
Microcontroller having less instructions and more bit handling instructions. Microprocessor having more instructions and few bit handling instructions.

2. what is clock cycle?
Clock cycle is the time duration between two clock pulses of an oscillator. The speed of a controller is more if number	of clock cycles per second is more. Microcontroller speed is measured using number instructions executes per second.

3. How to calculate the clock frequency of a contoller?
It is the frequency of the oscillator we are using to generate clock is the clock frequency of the controller. 

4. what is oscillator?
Oscillator is a circuit which produces the continuous alternating waveform without any input. Crystal osillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal to create an electric signal with a precise frequency.

5. What is the difference between serial and parallel communication?

In Serial communication data is transmitted serially bit by bit. In parallel communication data is transmitted parallely all the bits in one time.Serial communication needs less number of wires for connection. Parallel communication needs more wires for connection.


6. what is difference between rs232 and rs485?

RS232 RS485
The cable length limited to lesser than 50 feets. It is supporting long distance similar to rs422.
RS232 is single ended susceptible to noise since transmit and receive lines sharing the same ground. it supports multiple command and multiple listening devices and rs422 supports single command and multiple listeners.
Not multidrop - you can connect one rs232 device per port. if we want to connect to 3 meters to a pc we need rs232 protocol ports. rs485 uses 2 wires, twiested interface
Ground is common between tx and rx device, Need minimum 3 wire to communicate since the communication is happened in the two wires, you need to disable and enable the transmitter at the correct time. so that the proper communication should happen.

7. what is the difference between RISC and CISC controllers?
RISC CISC
Reduced instruction set computer is having less number of instructions. The RISC processors have simple instructions taking about one clock cycle. the cisc processor has complex instructions that take 2 to 15 clock cycles.
Performance is more focussed on software. Performance is more focused on hardware.
Most instrcutions are completed in 1 machine cycle. It has a memory unit to implement complex instructions.
- pipelining technique used to speed up RISC controllers. - multiple register set. - ecxecution time is very less - code expansion can be a problem - instruction decoding is simple - It does not require external memory for calculation - The most common risc processors are Alpha, ARC, AVR, MIPS, PA-RISC, Power Architecture, SPARC - RISC architecture is used in high end applications such as vedio processing, telecommunications and image processing. - it is having single register set - ecxecution time is very high - code expansion is not aproblem. - instruction decoding is complex - It requires external memory for calculation - examples of CISC processors are the System/360, VAX, PDP-11, Motorola 68000 family, AMD and Intelx86 CPU. - CISC architecture is used in low-end applications such a security system, home automation.

8. mention the required components of embedded system?

- Hardware -
  - microcontrollers
  - memory
  - timers
  - IO circuits
  - system application circuits, 
  - software
  -It checks the availabity of system memory
  - It checks the processor speed availability 
  - the need to limit the power lost when running the system continuously
- RTOS
It runs the processor as per scheduling and do the switching from one process to another

9. what are realtime embedded system?
Real time embedded system are systems that monitor, respond or control an external environment. This environment is connected to the system through actuators, sensors and input output interfaces.

10. what is Watchdog timer?
Watchdog timer will reset the system if it is not reloaded before watchdog timer expires. If the system do some malfunction then it would not reset the timer so the watchdog timer will reset the system.

Interrupts in Embedded System QA

Interrupts Q and A


1. What is interrupt?
	Interrupt is an input signal to the processor or microcontroller that an event needs immediate attention.
Interrupt is a request for the processor to stop the currently executing program and to execute the interrupt routine.
If the interrupt is accepted by the processor, it will stop the currently executing program, 
It will save the registers values, and return address of the program, then it will move to execute the interrupt 
program. After executing the interrupt routine, using return address it will start executing program which it was executing earlier program . 

There are two types of interrupts
Hardware interrupt:
It is a hardware signal to the cpu that it should be responded immediately. 
The cpu should save its current context and execute the inerrupt routine.

Software Interrupt:
Software interrupt is an software instruction which causes the inerrupt to occur.

2. What is iterrupt latency?
Interrupt latency is the time it take from when the interrupt is generated to the interrupt routine
started to execute. The interrupt latency is affected by microcontroller design.

Causes for interrupt latency time?
 - The interrupt requesting signal should be synchronised to cpu clock, it takes 3 clock time for interrupt signal to reach the 
   cpu core.
 - Typically the cpu complete the current instruction and then executes the isr. The time taken for the instruction to execute 
   is depending on the instruction it executes. If the instruction takes more time the latency time increases.
 - Memory system requires additional cycle states for wait states.
 - after executing the current instruction the cpu do the mode switch or pushes the register contents on to the stack.
   Arm controllers uses the mode switch which takes less time than pushing registers to the stack.
 - pipeline fill - most modern cpus are pipelined, if the interrupt is occured when the pipeline is filled then if the mode 
   switch is occured then extra cycles are needed to refill the pipline.
 - an Rtos disable interrupts to executes its api, it increases the latency time since it has to complete the executing the api 
   and then it will execute the interrupt.


3. How the interrupt routine should be?
    The interrupt routine size should be small as much possible as.
The isr size made small to make place for other isr to execute, otherwise the delay increases
for other ISRs to execute.



4. What are the different types of interrupt?

There are two types of interrupts
Hardware interrupt:
It is a hardware signal to the cpu that it should be responded immediately. 
The cpu should save its current context and execute the inerrupt routine.

Software Interrupt:
Software interrupt is an software instruction which causes the inerrupt to occur.

5. what is instruction pipeline?
   While executing the code the cpu loads the instructions to a pipeline, then it executes the instructions one by one.
 instructions are loaded as per the program flow.

6. what is interrupt priority?
  The interrupt priority is the priority set to each interrupt routine. 
  The high priority routine executes first and then the low priority interrupt will executes.
  If the low priority interrupt is executing, then if some high priority interrupt is requested, then the
  controller will stop executing the low priority interrupt and execute the high priority interrupt then
  executes the low priority interrupts.

7. what is interrupt vector table?
  Interrupt vector table is a addresses of the ISRs for the Interrupt handler to search Isrs.
  All interrupts are assigned with a number from 0 to 255. each of these interrupts are associated
  with aspecific interrupt address.
  Normally interrupt vector table is located in the first 1024 bytes 0000 to 03ff. Each interrupt takes 
  the 4 bytes address. so it needs 256 * 4 = 1024 bytes memory space.


8. what are different Triggering methods for interrupts?
   each interrupt can be triggered by either a logic level or edge 
  logic level can be low or high level
  edge triggered means rising edge or flaaing edge.
  Inerrupt can occur on rising edge or falling edge.
  Interrupt can occur on low or high logic level.

 
9. what are maskable interrupts?
   The ineterrupts in the microcontroller can be enable and disable using the register mask.
   To enable an interrupt a perticular bit has to be set in the mask register.
   To disable an interrupt a perticular  bit has to be reset in the mask register.
   the interrupt which are affected by mask register are called maskable interrupts.

10. what are non maskable interrupts?
   some interrupts cannot be disabled using interrupt mask, these interrupts are called Non maskable interrupts.

Interview QA – III

Interview QA - III



Ques 1. what are storage classes and their scope?

The storage classes in C are auto, Register, static, extern.

auto: Local variables are by default auto variables.
      auto variables stored in stack memory
      the scope of auto variables is local to the funtion, it exists till the 
      program control present in the function.
      It is used for local variables declaration.

Register: The scope of this variable is local to the function.
          The variable is stored in controller registers, if the registers are full then 
           the variables are converted into auto variable .
          The life is present till the program control present in the funtion where it is declared.
          It is used for loop variables, since it is stored in register accessing it is fast.

static: The scope of static variable is local to the funtion where it is declared. If the variable is
        declared global then its scope is only in the file where it is declared.
	It is stored in data memory.
	Its life is till the program running.

extern : It is used for the global variables. if we want to access the global varible declared in 
         another file we use extern storage classifier to access it.
         scope is through out the file where it is declared.
         it stores in data memory.
        

Ques 2. what are the features of c language?

The most important features of c languages are:
 - portability  - c language is platform indpendent language.
 - modularity   - the larger program can be break down into smaller programmes. 
 - flexibility  - the language is flexible to write os, compilers and embedded system programmes.
 - speed        - the c language compile and executes high speed compared with other high level languages.
 - extensibilty - the possibility to add new features to the program.



Ques 3. what are the basic data types associated with c language?
  - int - it is used to store numbers
  - float - it is for numbers with fractional part
  - char - it is used for stor
  - double - it is for double precision floating point representation.
  - void - special purpose type without any value.




Ques 4. what is structure padding and packing?

when a structure is declared integers take 4 bytes of memory,
The char came in between the integers then it also takes 4 bytes, the data stored in 1 byte remaining
bytes are garbage values stored and this is called padding.
So save the memory storage all ints and floats has to be declared serially then chars has to be declared. 

to occupy all the memory without leaving space in between then packing has to be done.
this done by declaring 
#pragma pack(1)

above main funtion.


Ques 5. what is dangling pointer?
	A pointer is declared and memory is allocated with malloc or calloc and then it is freed.
The pointer is still pointing to same memory, but memory is not reservered for it.
This type of pointer is called dangling pointer.


Ques 6. what is wild pointer in c?

If a pointer is declared but memory is not allocated. then it is pointing some memory. 
it is bad programming practice and it leads to bad programming practice. this ponter is called wild pointer.


Ques 7. what is prototype of a function?
	Prototype of a function is a declaration of a funtion with the following information to the controller.
	-- the return type of the function. 
	-- the input parameters to the funtion
        -- name of the function
	
	ex: int fun(char, float);

Ques 8. what is the differance between == and = ?
        = is an assignment.
	== is a equality checking operator it gives true or false status.


Ques 9. what is the cyclic nature of datatypes in c?
	If the value of the variable is goes beyond its range then the value change according to cyclic nature.
there is no compiler error for this. the data types int, char long supports this feature, and float and double
not supporting it.

ex:
     char ch=129;
 then ch=-127 this called cyclic in nature.
 since the range of character is -127  -- 0 -- 128.


Ques 10. what is nested loops in c?

executing loop inside another loop is called nested loops.
ex:
    for(i=0;i<5 ; i++)
    {      
      for(j=0; j<5; j++)
      {
      }
    }

Ques 11. what is break and continue statement in c?
	the on executing break statement the program control goes out of the loop or switch statement.
        on executing continue in a loop statement, the control goes to the beginning of the loop.
	
 for (i=0; i<5; i++)
  {
   if(y == 0)
      break;
   else
      z=x/y;
  if (z > 23)
   continue;
  }



Ques 12. How data is stored in stack?
	The data stored in stack is of the form FILO, first in last out. The data stored last is retreived first.
for storing we use push() operation, for retriving we use pop() function.


Ques 13. what { } indicates in c language?

	This { } curly brackets indicates the block of code start and end.
	It can be used in for , while, do while loops. it is also used in if, else, switch structures. 


Ques 14. how to generate random number in c?
 The random numbers can be generated using rand() function.

void main()
{
int a;
a=rand();
}


Ques 15. what is indirect reference in c?
 
	If a variable is declared as pointer then it is called indirect reference to the variable, 
we cannot access the variable directly. If the variable is declared then it can be accessed directly.

C Pointers 2

C Pointers 2



Ques 1. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int (*fun)();
int disp()
{
printf("\n this is display function");
}

int main()
{
fun=disp;
fun;
return 0;
}

options:
A. runtime error
B. this is display funtion
C. compiler error
D. prints some garbage string.


Ques 2. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int (*fun)();
int disp()
{
printf("\n this is display function");
}

int main()
{
fun=disp;
fun();
return 0;
}

options:
A. runtime error
B. this is display funtion
C. compiler error
D. prints some garbage string.




Ques 3. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int (*fun)(int, int, char );
int math(int x, int y, char ch)
{
if(ch == '+')
return x+y;
}

int main()
{
int ans;
fun=math;
ans = fun(22,33,'+');
printf("\n ans= %d", ans);
return 0;
}



options:
A. 0 
B. runtime error
C. compiler error
D. 55


Ques 4. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int (*fun[4])(int, int, char );
int math(int x, int y, char ch)
{
if(ch == '+')
return x+y;
else
return 0;
}

int main()
{
int ans;
fun[0]=math;
ans = fun[0](22,33,'+');
printf("\n ans = %d", ans);
return 0;
}

options:
A. 55
B. compiler error
C. 0 
D. 155


Ques 5. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
typedef int (*f)(int, int, char);
f funptr[3];

int math(int x, int y, char ch)
{
if(ch == '+')
return x+y;
else
return 0;
}

int main()
{
int ans;
funptr[0] = math;
ans = funptr[0](2,3,'+');
printf("\n ans = %d", ans);
return 0;
}

options:
A. 55
B. 5
C. 0
D. compiler error


Ques 6. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
void fun()
{
printf("\n this is fun().");
}

void math(int (*fee)())
{
fee();
}

int main()
{
math(fun);
return 0;
}

options:
A. prints garbage string.
B. run time error
C. compiler error
D. this is fun().


Ques 7. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
void fun()
{
printf("\n this is fun().");
}
void fun2();

int main()
{
fun2=fun;
fun2();
return 0;
}

options:
A. run time error
B. this is fun().
C. compiler error
D. garbage string.


Ques 8. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[2][4] ={{4,1,3,4},{5,8,9,11}};
printf("%d, %d", ++(*arr[0]), *arr[0]);
return 0;
}

options:
A. 4 4
B. 5 5
C. 3 3
D. compiler error


Ques 9. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[2][4] ={{4,1,3,4},{5,8,9,11}};
printf("%d, %d", *(arr+1)[0], *arr[0]);
return 0;
}

options:
A. compiler error
B. 4, 1
C. 1, 4
D. 5, 4


Ques 10. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[2][4] ={{4,1,3,4},{5,8,9,11}};
arr++;
printf("%d, %d", *(arr+1)[0], *arr[0]);
return 0;
}
options:
A. 4, 1
B. 2, 3
C. Compiler error
D. 5, 8


Ques 11. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[8] ={4,1,3,4,5,8,9,11};
int *p=arr;

printf("%d %d", *(p+1), *(arr+1));
return 0;
}

options:
A. 1 1
B. 4 4
C. 5 5
D. compiler error


Ques 12. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[2][4] ={4,1,3,4,5,8,9,11};
int *p=arr[1];

printf("%d %d", *(p+1), *(arr[0]+2));
return 0;
}

options:
A. 1, 3
B. 8, 3
C. compiler error
D. 5, 9


Ques 13. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

int main ()
{
int arr[2][4] ={4,1,3,4,5,8,9,11};
int *p=arr[0];

printf("%d %d", *(p+1), *(p+6));
return 0;
}

options:
A. 4, 8
B. compiler error
C. 1, 9 
D. 0, 0


Ques 14. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

int main ()
{
int arr[2][4] ={4,1,3,4,5,8,9,11};
int *p=arr[0];

printf("%d %d", ++*(p+1), ++*(p+6));
return 0;
}
options:
A. 2, 10
B. compiler error
C. 3, 11
D. 0 , 0


Ques 15. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main ()
{
int arr[2][4] ={7,1,44,4,5,8,9,11};
int *p=arr[0];

printf("%d %d", *p, ++(*p));
return 0;
}
options:
A. 8 8
B. 7 7
C. 1 1
D. 7 1



Answers

1. C 2. B 3. D 4. A 5. B 6. D 7. C 8. B 9. D 10. C 11. A 12. B 13. C 14. D 15. A

C Datatypes Q & A

C Datatypes Q & A


Ques 1. What is the output of following program. Assume that the numbers are stored in 2's complement form.

#include<stdio.h> 
int main()
{
   int m = -2;
   int n = ~1;

   printf("0x%x 0x%x ", m, n);

   return 0;
}

options:
A. 0xfffffffe 0xfffffffe
B. compiler error
C. -2 -2
D. -2 -1


Ques 2. which is invalid in the following code declaration in C?

1. short int q;
2. signed long a
3. long e;
4. unsigned short r;

options:
A. 1 & 2 valid 
B. 3 valid
C. 4 valid
D. all valid



Ques 3. what is the output for the below code?

#include<stdio.h>
int main()
{
   float x = 15.0,z;
   z = 9/5 * x+32;
   printf("z=%0.2f",z);
   return 0;
}


options:
A. 47.00
B. 59.00
C. 32.00
D. 45.00



Ques 4. what is the output for the below code?

#include<stdio.h>
int main()
{
   char d = '2';
   char e = 022;
    printf("%d %d", d,e);
    return 0;
}

options:
A. 50 18
B. 22 22
C. Compile time error
D. run time error



Ques 5. In C, sizes of an integer and a pointer always same.

options:
A. True
B. False


Ques 6. what is the output for the below code?
int main()
{
    void *gptr, g;
    g = 0;
    gptr = &g;
    printf("%v", *gptr);
    getchar();
    return 0;
}

options:
A. 0
B. runtime error
C. 48
D. Compile time error



Ques 7. what is the output for the below code?

#include<stdio.h>
int main()
{
    char m=0;
    char ch = 125;
    ch = ch+10;
    printf("%d\n ", ch);
    return 0;
}

options:
A. -121
B. 121 
C. 135 
D. compile time error



Ques 8. what is the output ?

#include<stdio.h>
int main()
{
    int x = -1;
    printf(" %x %x\n", x, sizeof(long));
    return 0;
}

options:
A. ffffffff 4
B. -1 4
C. compiler error
D. None of the above


Ques 9. what is the output for the below code?

#include<stdio.h>
int main()
{
    float x = 0.1;

    if ( x == 0.1 )
        printf("IF");
    else if (x == 0.1f)
        printf("ELSE IF");
    else
        printf("ELSE");
}


options:
A. ELSE IF
B. ELSE
C. IF
D. error


Ques 10. what is the output for the below code?

#include<stdio.h>
int main()
{
    char t = 125;
    int i;

    for(i=0; i<5; i++)
      printf("%d ", t++);

    return 0;
}

options:
A. 125 126 127 128 129
B. 125 126 127 -128 -127
C. infinete loop
D. none of the above 



Ques 11. what is the output for the below code?

#include<stdio.h>
int main()
{
    char t = 0;
    for(t=0; t<135; t++)
      printf("\n%d", t);
    return 0;
}

options:
A. prints 0 to 135
B. infinite loop
C. error
D. runtime error


Ques 12.  Which data type is most suitable for storing a number 65000 in a 32-bit system?

options:
A. signed short
B. unsigned short
C. long
D. int



Ques 13: Which of the following is a User-defined data type?

options:
A. typedef int signedint32;
B. typedef enum {Jan, Feb, Mar, Apr, MAy} Months;
C. struct {char str[10], int age};
D. all of the mentioned


Ques 14: What is the size of an int data type?

Options:
A. 4 bytes
B. 8 bytes
C. Depends on the system /compiler
D. 2 bytes

Ques 15:  What is the output for the below program?
#include<stdio.h>
    int main()
    {
        char ch;
        int j = 0;
        FILE *file;
        file = fopen("test.txt", "w+");
        fprintf(file, "%c", 'd');
        fprintf(file, "%c", -1);
        fprintf(file, "%c", 'g');
        fclose(file);
        file = fopen("test.txt", "r");
        while ((ch = fgetc(file)) !=  -1)
            printf("%c", ch);
        return 0;
    }

options:

A. d
B. depends on what fgets returns
C. depends on compiler 
D. infinite loop


Ques 16: What is the output for the below program?
#include<stdio.h>
int main()
{
    void *gptr;
    int *g;
    gptr=(int *)malloc(4);
    g=(int* ) gptr;
    *g=43;
    *(int *)gptr=34;
    printf("%d %d", *g, *(int*)gptr);

    getchar();
    return 0;
}

options:
A. 34 34
B. 35 35
C. compiler error
D. run time error


Ques 17: What is the output for the below program?
#include<stdio.h>
int main()
{
     int x,y;
    double d;

    x=44, y=5;
    d=x/y;
    printf("%lf", d);

    return 0;
}

options:
A. 8.80000
B. 8.0000
C. compiler error
D. run time error


Ques 18: What is the output for the below program?
#include<stdio.h>

int main()
{
    float x,y;
    double d;

    x=4.0, y=5.0;
    d=x/y/x;
    printf("%lf", d);

    return 0;
}

options:
A. 0.8000
B. 3.2000
C. 0.2000
D. run time error


Ques 19: What is the output for the below program?
#include<stdio.h>

int main()
{
    unsigned int m=121;
    signed int i=225;
    char c=34;

    c=i+m;    
    printf("%d",c);
    return 0;
}
options:
A. runtime error
B. compiler error
C. 346
D. 90

Ques 20: What is the output for the below program?
#include<stdio.h>
int main()
{
    unsigned int m = 65632;
    signed short i=225;
    i = m;
    printf("%i",i);
    return 0;
}

options:
A. 65632
B. 65631 
C. 96
D. 97

Answers

1. A 2. D 3. A 4. A 5. B 6. D 7. A 8. A 9. A 10. B 11. B 12. B 13. D 14. C 15. A 16. A 17. B 18. C 19. D 20. C

Interview QA 2

Interview QA 2



Ques 1. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
#define DEBUG(x, %d) printf("DEBUG : %d", x) 
int main()
{
    int x=44;
    DEBUG(x,%d);
    return 0;
}

Explanation:
Here in DEBUG macro %d is not a variable, it gives compiler error.

Rules for naming identifiers
A valid identifier can have letters (both uppercase and lowercase letters), digits and underscores.
The first letter of an identifier should be either a letter or an underscore.
You cannot use keywords as identifiers.
There is no rule on how long an identifier can be. 
However, you may run into problems in some compilers if the identifier is longer than 31 characters.



Ques 2. what is the ouput?
#include <stdio.h>
#include <stdlib.h>
#define cube(x) x*x*x
int main()
{
    int x=2, y=4;
     y=y/cube(x) ;
     printf("%d",y);
    return 0;
}

Explanation:
after preprocessing  the statement  y=y/cube(x)
become   y=y/x*x*x;
         it evaluates as
         y= (y/x)*x*x = (4/2)*2*2= 2*2*2= 8



Ques 3. what is dirty bit?

Explanation:
 In computer dirty bit or modified bit indicates the block of memory is modified or not .
if the dirty bit is set then the block of memory is modified otherwise id not modified.
the operating system checks this bit before writing the block of memory to secondary storage
if the bit is set then the block of memory is written to secondary storage.


Ques 4. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int x=-2;
    printf("%x",x>>3);
    return 0;
}

Explanation:
-2 = fffffffe = 11111111 11111111 11111111 11111110
after  >> 3
 = ffffffff

if define the x as unsigned int
after right shift it becomes 1fffffff



Ques 5. which is efficient in switch or if else ?

Explanation:
    In if else each the condition has to be evaluated at run time,
in switch only evaluating the variable value is done at run time, 
remaining cases is fixed and it is evaluated at compile time.


Ques 6. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int ch =1, y=0;

    if(ch==1, y>ch )
    {
     printf("\n if is evaluated.");
    }
    else
    {
        printf("\n else is evaluated.");
    }

    return 0;
}

Explanation:
Here the if condition is correct in syntax,
however it will evaluate the the first condition, and it considers 
the last condition for control flow.


Ques 7. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int ch =1, y=0;

     printf("\n %d", scanf("%d %d", &ch, &ch));


    return 0;
}

Explanation:
Here the scanf funtion returns how many arguments it is reading.
The return value of scanf funtion is printed in printf funtion.


Ques 8. what are near, huge, far memory ?

Explanation:
near means the variable is stored in the current segment of 64 kb of memory
far means the variable is stored or can access within in the 128kb of memory,
here the segment register is fixed
huge means the variable is stored or can access more than 128kb of memory, 
here the segment register can change.


Ques 9. write a program for swap the bytes in the variable var1=0x4567 ?

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int var1 =0x3255;
    var1 = (var1 >> 8) | ((var1&0xff)<<8);
    printf("0x%x",var1);
    return 0;
}




Ques 10. difference between <> and "" in #include statement?

Explanation:
< > means the file is included from the library or predesignated by the compiler.
the compiler will search the included file in that directory. 
Normally this is used to include the standard header files.

" " means the the compiler searches the included header file in the current working directory.
normally it used to include the user defined header files.

Storage Classifiers

Storage Classifiers



Ques 1. what are stoagre classifiers in c?


options:
A. auto, static, register, extern 
B. auto, float, register, extern
C. char, static, register, extern
D. auto, static, register, int


Ques 2. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
void fun();
int main()
{
fun();
}

void fun()
{
    static int x=4;
  if(x-- != 0 )
  {
    fun();
    printf("%d ",x);
  }
}

options:
A.  0 0 0 0
B. -1 -1 -1 -1 
C.  4 3 2 1
D.  infinite loop


Ques 3. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
void fun();
int main()
{
fun();
}

void fun()
{
    static int x=4;
  if(x-- != 0 )
  {
    printf("%d ",x);
    fun();
  }
}

options:
A.  0 0 0 0
B. -1 -1 -1 -1 
C.  3 2 1 0
D.  infinite loo


Ques 4. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    auto int abc = 34;
    auto int * const ptr = &abc;
    *++ptr;
    printf("%d", abc);

    return 0;
}

options:
A. 34
B. 35
C. compiler error
D. run time error


Ques 5. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    auto int abc = 34;
    auto int * const ptr = &abc;
    ++*ptr;
    ++*ptr;
    --*ptr;
    printf("%d", abc);

    return 0;
}

options:
A. 34
B. 37
C. 36
D. 35


Ques 6. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    register int abc = 34;
    register int * const ptr = &abc;
    --*ptr;
    printf("%d", abc);

    return 0;
}

options:
A. 33
B. compiler error
C. 34
D. 35342


Ques 7. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    register int abc = 3;

    for(abc=3; ;)
    printf("%d", abc);

    return 0;
}

options:
A. infinite loop 
B. 3 3 3
C. compiler error
D. runtime error


Ques 8. what is the output for the below code?
int abc;
int main()
{
    int abc = 3;
    printf("%d\n ",abc);
    return 0;
}

options:
A. 0
B. 3
C. compiler error
D. runtime error


Ques 9. what is the output for the below code?
typedef static int abc ;

abc si=3;
int main()
{
    si++;
    printf("%d\n ",si);
    return 0;
}

options:
A. 4
B. runtime error
C. compiler error 
D. 3


Ques 10. what is the output for the below code?

typedef int abc ;

abc si=3;
int main()
{
    si++;
    si++;
    --si;
    printf("%d\n ",si);
    return 0;
}

options:
A. 6 
B. 5
C. 3
D. 4


Ques 11. what is the output for the below code?
int gi =332;
extern int gi ;

int main()
{
    printf("%d\n ",gi);
    return 0;
}

options:
A. 332
B. 0
C. compiler error
D. runtime error


Ques 12. what is the output for the below code?
volatile const int v =332;
int main()
{
    v += 4;
    printf("%d\n ",v);
    return 0;
}

options:
A. 336
B. compiler error
C. 332
D. runtime error


Ques 13. what is the output for the below code?
volatile int v =332;
int main()
{
    v += 4;
    printf("%d\n ",v);
    return 0;
}

options:
A. compiler error
B. 332
C. 336
D. runtime error


Ques 14. what is the output for the below code?
volatile int v =332;
int main()
{
    static int i=3;
    printf("%d ",v);

    {
     auto int p=89;
     i++;
     printf(" %d ", p);
    }
    {
        register int s=5;
        printf(" %d %d",s, i);
    }

    return 0;
}

options:
A. compiler error
B. run time error
C. 332 89 5 4
D. 332 89 5 3


Ques 15. what is the output for the below code?
volatile int v =32;
void fun();
int main()
{
    static int i=3;
    printf("%d ",v);

    {
     auto int p=89;
     i++;
     printf(" %d ", p);
    }
    {
        register int s=5;
        printf(" %d %d",s, i);
    }
fun();
    return 0;
}

void fun()
{
    v++;
 printf(" %d", v);
}

options:
A. 32 89 5 4 33
B. compiler error
C. run time error
D. 32 89 5 3 32


Answers

1. A 2. B 3. C 4. C 5. D 6. B 7. A 8. B 9. C 10. D 11. A 12. B 13. C 14. C 15. A

Dynamic Memory Allocation QA

Dynamic Memory Allocation QA



Ques 1. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char *s;
    s=malloc(26);
    strcpy(s, "ptinstitute.in");
    printf("%s\n",s);
    return 0;
}

options:
A. ptinstitute.in
B. 0
C.compiler error
D. runtime error


Ques 2. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char *s;
    s=malloc(26);
    strcpy(s, "good morning");
    free(s);
    printf("%s\n",s);
    return 0;
}
options:
A. good morning
B. garbage string
C. comipler error
D. rutime error


Ques 3. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char *s;
    s=malloc(26);
    s=NULL;
    strcpy(s,"good");
    printf("%s\n",s);
    return 0;
}

options:
A. runtime error
B. good
C. 0
D. compiler error


Ques 4. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char *s;
    s='g';
    printf("%s\n",s);
    return 0;
}

options:
A. compiler error
B. 0
C. g
D. run time error


Ques 5. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int *foo(void)
{
    int x=22;
    return &x;
}

int main()
{
    int *w;
    *w=foo() ;
    printf("\n %d", *w);
    return 0;
}


options:
A. 0
B. 22
C. run time error
D. garbage value


Ques 6. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int foo(int *s)
{
    int *x=s;
    return *x;
}

int main()
{
    int w[1]={23};
    w[0]=foo(w) ;
    printf("\n %d", *w);
    return 0;
}


options:
A. run time error
B. 23
C. 0
D. garbage value


Ques 7. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int* foo(int *s)
{
    int *x=s;
    x++;
    return x;
}

int main()
{
    int w[4]={56,3,44,5};
    int *p;
    p=foo(&w[0]) ;
    printf("\n %d", *p);
    return 0;
}

options:
A. 44
B. 56
C. 3
D. run time error


Ques 8. what is the output for the below code?
int * foo(int *s)
{
    s=(int *)malloc(4);
    return s;
}

int main()
{
    int *p;
     p= foo(p);
    *p=283;
    printf("\n %d", *p);
    return 0;
}

options:
A. 283
B. 284
C. run time error
D. compiler error 


Ques 9. what is the output for the below code?
int main()
{
    int *p;
     p= (int *)malloc(4);
    *p=283;
    ++*p;

    printf("\n %d", *p++);
    return 0;
}


options:
A. 281 
B. 283
C. 285
D. 284


Ques 10. what is the output for the below code?
int main()
{
    int  *q;

     q=calloc(12,1);
    *q=54;
    *(++q)=78;

    printf("\n %d %d", *(--q), *(q));
    return 0;
}

options:
A. run time error
B. 54 78
C. 55 79
D. 53 77


Ques 11. what is the output for the below code?
int main()
{
    int  *q[2];

     q[0]=calloc(4,2);
     q[1]=calloc(4,2);
    **q=54;
    *q[1]=58;
     ++(*q[1]);

    printf("\n %d %d",  **q, *q[1]);
    return 0;
}

options:
A. 55 58
B. 54 58
C. 54 59
D. run time error


Ques 12. what is the output for the below code?
int main()
{
    int  *q[2];

     q[0]=(int *)calloc(4,2);
     q[0]=(int *)realloc(q[0], 20);

    **q=54;
    ++**q;
    *(q[0]+3) = 78;
    --(*(q[0]+3));

    printf("\n %d %d",  **q, *(*q +3));
    return 0;
}


options:
A. 54 78
B. 55 77
C. 54 78
D. run time error


Ques 13. what is the output for the below code?
int main()
{
    int  ****p;
    int  ***q;
    int  **r;
    int  *s;

   s=(int *)malloc(4);
   r=&s;
   q=&r;
   p=&q;

   *s=47;

    printf("\n %d %d %d %d",  *s, **r, ***q, ****p);
    return 0;
}


options:
A. run time error
B. 47 46 47 0
C. 46 45 0 0
D. 47 47 47 47


Ques 14. what is the output for the below code?
int main()
{
    int  ****p;
    int  ***q;
    int  **r;
    int  *s;

   s=(int *)malloc(4);
   r=&s;
   q=&r;
   p=&q;

   *s=47;
   ++**r;
   ++***q;
   ++****p;

    printf("\n %d %d %d %d",  *s, **r, ***q, ****p);
    return 0;
}

options:
A.47 47 48 47 
B.50 50 50 50
C. 47 46 50 47
D. 47 48 49 59


Ques 15. what is the output for the below code?
int main()
{
    int  *s;
    s=(int *)calloc(4, 5);
    *s=45;
    s++;
    *s=56;
    *s=++(*s);

    printf("\n %d %d ",  *s, *(s-1));
    return 0;
}
options:
A. 45 57
B. 56 45
C. 57 45
D. 45 56


Ques 16. what is the output for the below code?
int main()
{
    int  *s;
    s=(int *)calloc(4, 2);
    s=realloc(s, sizeof(int)*4);
    *s=45;
    s++;
    *s=56;
    *s=++(*s);
    *(++s) =78;
    *(++s) =97;

    printf("\n %d %d %d %d",  *s, *(s-1), *(s-2), *(s-3));
    return 0;
}

options:
A. 57 97 45 57
B. 78 97 45 57
C. 97 78 57 45
D. 45 57 78 97


Ques 17. what is the output for the below code?
int main()
{
    int  *s[1];
    *s = (int *)malloc(4);
    *s = realloc(*s, sizeof(int)*3);
    **s = 45;
    ++(*s);
    **s=56;
    *(++(*s)) =78;
    *(++(*s)) =97;

    printf("\n %d %d %d %d",  **s, *(*s-1), *(*s-2), *(*s-3));
    return 0;
}
options:
A. 45 56 78 97 
B. 97 78 56 45
C. 45 56 97 78
D. 56 45 78 97


Answers

1. A 2. B 3. A 4. D 5. C 6. B 7. C 8. A 9. D 10. B 11. C 12. B 13. D 14. B 15. C 16. C 17. B

Advanced Pointers

Advanced Pointers



Ques 1. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int * add(int *p, int *q)
{
 int sum;
  sum=*p+*q;
  return ∑
}

int main()
{
  int r = 20, s=3;
  int *sum;
  int *p = &r, *q=&s;

  sum=add(p, q);

  printf("%d ", *sum);
  return 0;
}

options:
A. runtime error
B. 23
C. 0
D. compiler error



Ques 2. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>

int * add(int *p, int *q)
{
 int *sum =(int*)malloc(4);
  *sum=*p+*q;
  return sum;
}

int main()
{
  int r = 20, s=3;
  int *sum;
  int *p = &r, *q=&s;

  sum=add(p, q);

  printf("%d ", *sum);
  return 0;
}

options:
A. compiler error
B. runtime error
C. 23
D. 0


Ques 3. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

void swap(int *p, int *q)
{
 int t;
 t=*p;
 *p=*q;
 *q=t;
}

int main()
{
  int r = 20, s=3;
  int *p = &r, *q=&s;

  swap(p, q);

  printf("*p=%d *q=%d", *p, *q);
  return 0;
}

options:
A. *p=20 *q=3
B. runtime error
C. *p=3 *q=20
D. compiler error


Ques 4. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
void swap(int *p, int *q)
{
 int t;
 t=p;
 p=q;
 q=t;
}

int main()
{
  int r = 20, s=3;
  int *p = &r, *q=&s;

  swap(p, q);

  printf("*p=%d *q=%d", *p, *q);
  return 0;
}

options:
A. compiler error
B. *p=20 *q=3
C. *p=3 *q=20
D. run time error


Ques 5. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
  int r = 20, s=3;
  int *p = r, *q = s;

  printf("*p=%d *q=%d", *p, *q);
  return 0;
}

options:
A. 3, 20
B. 20, 3
C. compiler error
D. runtime error


Ques 6. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
   int (*q)[5];
   printf("%d",  sizeof(*q));
   return 0;
}

options:
A. compiler eror
B. 4
C. 20
D. runtime error


Ques 7. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>
int main()
{

   int (**q)[4] ={3,4,5,6,7,6};
   printf("%d",  sizeof(**q));
   return 0;
}

options:
A. 4
B. 16
C. 24
D. runtime error



Ques 8. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{
   int q[2][3][2] ={3,4,5,6,7,6};
   printf("%d",  sizeof(q));
   return 0;
}

options:
A. 20
B. 24
C. 4
D. 48


Ques 9. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{

   int q[6] ={3,4,5,6,7,6};
   int *r=(q+1);
   printf("%d %d",  *(r+2), *r++);
   return 0;
}

options:
A.
B.
C.
D.


Ques 10. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{

   int q[6] ={3,4,5,6,7,6};
   int *r=(q+1);

   printf("%d %d",  *(r+2), *r++);
   return 0;
}

options:
A. 7, 4
B. 6, 4
C. 5, 4
D. 5, 6


Ques 11. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{

   int p =32;
   int *q=&p;
   int **r=&q;

   printf("%d %d",  **r, *q);
   return 0;
}

options:
A. 32 32
B. 0 0
C. grabage value
D. runtime error



Ques 12. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{

   int p =32;
   int *q=&p;
   int **r=q;

   printf("%d %d",  **r, *q);
   return 0;
}

options:
A. 32 32
B. 0 0
C. grabage value
D. runtime error



Ques 13. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{

   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+2, p+3};
   int ***r=q;

   printf("%s %s",  **r, **(r+1));
   return 0;
}

options:
A. good test
B. welcome good
C. welcome test
D. test good


Ques 14. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};
   int ***r=q;
   r++;
   printf("%s %s",  **r, **(r+1));

   return 0;
}

options:
A. computer ptinstitute.in
B. ptinstitute.in computer
C. welcome good
D. runtime error



Ques 15. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>
int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};

   printf("%s %s",  ++(*p), *(p+2));

   return 0;
}

options:
A. good test
B. welcome test
C. elcome test
D. ood test


Ques 16. what is the output for the below code?

#include <stdio.h>
#include <stdlib.h>

int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};

   printf("%s %s",  **q, **(q+2));

   return 0;
}

options:
A. test computer
B. welcome test
C. welcome good
D. good computer


Ques 17. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};

   printf("%s %s",  *(*q++), **(q+2));

   return 0;
}
options:
A. compiler error
B. runtime error
C. welcome good
D. good test


Ques 18. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};

   printf("%s %s",  *(*q)++, **(q+2));

   return 0;
}
options:
A. compiler error
B. runtime error
C. welcome good
D. good computer


Ques 19. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   int **q[]={ p+1, p+4, p+3};
p[1]= p[1] + 2;
p[3]= p[0] + 4;
   printf("%s %s",  *(*q)++, **(q+2));

   return 0;
}

options:
A. od mputer 
B. runtime error
C. welcome good
D. od ome



Ques 20. what is the output for the below code?
#include <stdio.h>
#include <stdlib.h>

void fun( char *p)
{
    printf("\n %s", ++p);

}
int main()
{
   char *p[] ={"welcome", "good", "test", "computer", "ptinstitute.in" };
   fun(p[2]);
   return 0;
}


options:
A. est 
B. runtime error
C. compiler error
D. test



Answers

1. A 2. C 3. C 4. B 5. D 6. C 7. B 8. D 9. C 10. A 11. A 12. D 13. A 14. B 15. C 16. D 17. A 18. D 19. D 20. A

Why C Is The Preferred Language For Embedded Systems

Why C Is The Preferred Language For Embedded Systems

Hello Friends,
I believe you wonder why C language is the preferred language for the embedded system, so here is the step by step analysis for you.

History Of C Programming

Before we enter into C language, let’s go through the history of computation. In around 1949 first computational electronic delay storage automatic calculator was incorporated with an assembler. So assembly language started gaining uses. Assembly language was based on mnemonics. In the year 1953 John W Backus and its team proposed a new language to its senior at IBM, and come up with one language that was based on assembly language but more user-friendly. This language was FORTON, the name derived from Formula Translation.

This language gain lot of popularity, used in many computational an intensive application like computational physics, numeric chemistry, weather prediction, crystallography, etc.

Now it was a time of 1969-70 when Dennis Ritchie and Ken Thompson we working in Bell labs. Ken was having a lot of ideas to improve paging, segmentation, process switch, etc. but to develop all those he was having the option to either improve the compiler of FORTON and make it strong or develop from the beginning. Both of then choose later option and started with some basic language available at that time.

Within 2 years of core working UNIX took a shape and the language C come into existence. The good part is C language is its compiler is written into a similar language like C, which is an amazing feature of C language.

Importance Of C in Embedded System

So now you can understand C language comes into existence with the motive to work develops operating system UNIX. C language is not a perfect language, it has many drawbacks like run-time checking, a lake of expectation handling, etc, but the perfect language is not yet created. Now C language is around 50 years old language, having a very very strong presence in the world of embedded systems, system programming, System programming. So for sure another next 50 years, C language will maintain its popularity and even increase. Now we start a discussion on why C language is the preferred language for embedded system development. As in this topic, we want to analyze why C has preferred the language in embedded systems, so we should know what embedded system is and what his limitation is. An embedded system is a normally small electronic device that is meant for a single purpose. As it is a small device then it is having the following limitation.

1) Low Memory Size

Normally microcontroller is coming in the smaller size, they are having a memory as low as 128 bytes. Inbuilt memory varies based on controller to controller. So the programming language should be such that which generates optimized code and occupied less memory footprint.
After C99 standard introduces, many optimization techniques and keywords are included in C language. The word “volatile” is directly dedicated to optimization.
Now a day new compiler is having the capability to generate so optimized code that even manually writing may not be possible.

2) Low Computational Power

Since the varying range of the controller, there is a possibility that for many small applications we may have less computational power. In C language has the capability to generate optimized code so that it consumes less power. Although the power required directly depends upon microcontroller internal architecture.

3) Uncontrolled And Infinite Life

Embedded application run for infinite time in the program, so code written into it should be thoroughly tested and validate so that it will work for life long. Thanks to the debugging environment available in C language, we can run the application in the acceleration mode and validate the application into debug mode to predict the lifelong behavior.

4) Mass Production Of Device

Since the embedded device is normally produced in term of million, so the language should support for automation and real-time support so that calibration, production testing, sales is possible easily. Even sometimes we also need to update firmware OTA – over the air.

So C language is supporting all possible ways in the embedded system.

What C Language Offer To Embedded System

Readability

C language syntax is easy to understand and it medium-level language. It is having the capability to interact with high-level languages like JAVA and C# and at the same time, C language is having the capability to interact with low-level Assembly language. Since C language is a procedure-oriented language, it helps to write modular code, which is highly readable. Embedded application code is written once then the main task is to maintain them throughout the product life, fix the bug, control version, testing, and validation. For all the above points we need to have code should be readable.

Portability

In the embedded system we need to write the code in one controller and release the product. Now suppose the controller used in obsolete and no more available for production. In this case, we need to move our source code to the new microcontroller, if the language is not supporting portability then we may need to start product development again. C language is highly capable to have portable code. Even more than 90% (on an average) code is capable to have portable and can be directly used into another controller, the available cross compiler takes care of many interoperable issues and as user prospect porting from one controller to other is not a very difficult task.

Simplicity

C language is easy to learn, it is having English like a keyword that is more relevant to the use case. Like keyword if, while, switch case, address, etc. all these keywords and similarly used in the English language also with almost similar use. Since C language is module language, once the student understands how to use the individual component then it will be very easy to use that module anywhere in programming. For example, once the student understands how to use, for loop in C language then it will be used as it is many places during programming.

Maintainability

There are many source control software and website are available that help to maintain source code, the main CVS, PVCS, Git-hub, etc. In the C language also there are many compile-time directives that help to maintain the source code version. The main compile-time keywords are #if, #else, #elif, #endif, #define etc. Using the above keyword, the user can do version control to make a good working code.

Scalable

C language is scalable to the extent that Linux is a million lines of code is written into C language. On average every day around 20-30 thousand lines of code are added into Linux OS itself. So C language is scalable up to the extent thought become limits.

Reliability

C language generates reliable code, its reliability making him use for Aerospace, avionics, defense, mission-critical application, nuclear plants, automobile products.

In the embedded system all most all the time we need to consider the following points during development.

1) Processor Independent

We should able to write code which will work on all processor.

2) Portability

The code should be easy to portable from one microcontroller to another.

3) Bit Manipulation

Usably in the embedded system, we are using bits and IO operation very frequently. Language should support this.

4) Memory Management

5) Code Optimization Possibility

6) Built-in Library Function

C is having many library functions available which can be used during application/system development.

Conclusion

Now being many years giving embedded systems training in Bangalore, At Professional Training Institute, We had come to ways across that C language is one of the most preferred languages in the embedded system. No language can replace C in the coming 20-30 years. It is having many bright career scope in the coming future. As many companies are coming for recruitment to us and asking for proficiency in C language only. Even during the embedded system training course, We focus mainly on C language gives the student to learn the C language up to 3 months. So let’s gear up and make your career into an embedded system, for that you must have an expert level of understanding in C level.

Best wishes for the coming future…

En-Query

Your Name*
Subject*
Phone Number*
Email Address*

Message*