ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what is the difference between. system call and library
function?
 Question Submitted By :: Rofique A
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the difference between. system call and library function?
Answer
# 1
system calls are provided by the system and are executed in
the system kernel. They are entry points into the kernel and
are therefore NOT linked into your program. These are not
portable calls.
·   Library calls include the ANSI C standard library and
are therefore portable. These functions are linked into your
program.
It is worth noting that, because system calls are part of
the O/S. The program has to make a context switch to the
kernel when they are called and because of this, they have a
high startup overhead. The upside is that the time executing
these routines is assigned to the OS and not the user program.
 
Is This Answer Correct ?    17 Yes 3 No
Vishnu948923
[No]
 
  Re: what is the difference between. system call and library function?
Answer
# 2
system call can be called from either kernel space or user 
space(in this case include switch to privilage mode) and 
executed in kernel space while library called only from 
user programm and may call systemcall to perform it is 
function like "printf" that need "write" system call while 
other not need kernel at all like sin(),cos().....

systemcall examples : write,read,close,mmap,open,.......
library examples: fopen,fclose,printf,scanf,fscanf,.....
 
Is This Answer Correct ?    6 Yes 0 No
Eng Abedalmohdi Almomani
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?  6
difference between memcpy and strcpy  1
what are the static variables HCL7
Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986  2
Hi, main() { } Is a user defined function or Built in Functionn Honeywell9
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child IBM9
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? Wipro1
What is the difference b/w main() in C language and main() in C++.  6
write a “Hello World” program in “c” without using a semicolon?  3
what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?  2
How does free() know how many bytes to free?  5
how to find the size of the data type like int,float without using the sizeof operator?  7
to find out the reverse digit of a given number Infosys5
who did come first hen or agg Infosys12
c program to add and delete an element from circular queue using array  1
Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv Accenture5
What is the memory allocated by the following definition ? int (*x)[10]; ADITI3
What are the languages are portable and platform independent?Why they are like that? Excel1
2)#include<iostream.h> main() { printf("Hello World"); } the program prints Hello World without changing main() the o/p should be intialisation Hello World Desruct the changes should be a)iostream operator<<(iostream os, char*s) os<<'intialisation'<<(Hello World)<<Destruct b) c) d)none of the above Siemens4
What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value Accenture3
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com