O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a navegar o site, você aceita o uso de cookies. Leia nosso Contrato do Usuário e nossa Política de Privacidade.
O SlideShare utiliza cookies para otimizar a funcionalidade e o desempenho do site, assim como para apresentar publicidade mais relevante aos nossos usuários. Se você continuar a utilizar o site, você aceita o uso de cookies. Leia nossa Política de Privacidade e nosso Contrato do Usuário para obter mais detalhes.
Developed by Dennis Ritchie between 1969 & 1973. Developed at the Bell Laboratories, aimed to use with UNIX OS. Widely used for developing application software, though it was mainly invented for developing system software.
Q.2: What is a staticvariable in context of C language?
Declared inside a function. Declared for function name. Declared for Global parameters.
Q.3: Can you explain the difference between a normal variable and a pointer?
A normal variable can have any value and can be changed throughout the length of the program. A pointer defines the address where another variable is stored and not any value.
Q.4: What is the differencebetween calloc() and malloc()?
malloc() will create single block of memory of size specified by the user. Example - p=(int*)malloc(sizeof(int)*5) calloc() takes two arguments and zero initializes the memory. It can assign multiple blocks of memory for a variable. Example - p=(int*)calloc(5,sizeof(int)*5)
Q.5: What is thedifference between printf() and sprint()?
Printf() outputs the data to the standard output device which is usually the computer monitor. Sprint() outputs the data to a character array.
Q.6: Which is the fastestsorting method you canuse while programming inc language?
This is a question which falls into “There is noone-size-fits-all answer” category. But fewoptions are- Quick sort. Radix sort. Merge sort.
Q.7: Is using functions or macros better when programming in C?
Macros are generally more efficient and faster. Macros cannot handle complex programming constructs and in such cases functions are used We can choose macros or functions based on our priority - speed vs. size of program.
C++ is an advanced version of C which introduced a lot of new features like classes and so on. It’s much more object oriented compared to the general purpose programming C was initially created for.