0% found this document useful (0 votes)
53 views

C Interview Questions Part 1

C language is a mid-level programming language developed in 1972 at Bell Laboratories. It binds low-level and high-level programming languages. Dennis Ritchie is the founder of C language. C language features include being simple, portable, mid-level, structured, with fast speed and memory management capabilities. Functions provide reusability and can be called multiple times. Pointers refer to memory addresses and are used for array elements, dynamic memory allocation, and call by reference. Dynamic memory allocation occurs at runtime using functions like malloc() and calloc().

Uploaded by

Nishitha Nishi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

C Interview Questions Part 1

C language is a mid-level programming language developed in 1972 at Bell Laboratories. It binds low-level and high-level programming languages. Dennis Ritchie is the founder of C language. C language features include being simple, portable, mid-level, structured, with fast speed and memory management capabilities. Functions provide reusability and can be called multiple times. Pointers refer to memory addresses and are used for array elements, dynamic memory allocation, and call by reference. Dynamic memory allocation occurs at runtime using functions like malloc() and calloc().

Uploaded by

Nishitha Nishi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

*c language is called mid-level

programming language because it binds


the low level and the high level
programming languages
*dennis Ritchie is the founder of c
language
*c language was developed in 1972 at
bell laboratories
*features of c
Simple,portable,mid level,structured,fast
speed,memory management,extensible
*printf is used to print the integer
*scanf is used to take input from the
user
*
Local variable Global variable
Inside the function Outside the
or block function or block
These are stored in Compiler decides
the stack

*static variables
>retains the value between multiple calls
>scope of the static variable is available
throughout the program
>it is initially initialised with zero
*uses of functions
>avoid rewriting the same code again
>can be called any number of times
>provide reusability concept
>can be easily tracked
*recursion
>function calls itself
*pointers
>pointer is a variable that refers to the
address of a value
Uses of pointers
>accessing array elements
>dynamic memory allocation
>call by reference
>data structures like trees graphs
*null pointer:a pointer that doesn’t refer
to any address value
*the pointer points to the deallocated
memory is called dangling pointer
*static memory allocation
>memory is allocated at the compile
time
>faster then dynamic memory
*dynamic memory allocation
>memory is allocated at the runtime
>malloc()and calloc()functions are usd to
allocate memory at the runtime
>less memory space is required to store
the variables where as in static memory
allocation more memory space is
required
*dynamic memory allocation
>malloc()
>calloc()
>realloc()
>free()
*a loop running continuosly for an
indefinite number of times is called an
indefinite loop
*fopen() is used to open file
*fclose()is used to close the file
*type casting is the process of
converting one data type to another
>the maximum length of the identifier is
ideally 32 characters
>getch():reads the single character from
keyboard but it is not displayed on the
output screen
>getche():function reads the single
character from keyboard but data is
displayed on the output screen
>ANSI:American national standard
institute
>what is command line argument?
The argument passed to the main
function while executing the program
>what is a token??
>the token is an identifier .it can be
constant,keyword,string
literal,operators,special characters
*we can compile the program without
main feunction but we cannot run it
*sprint():does not print the output on
the console screen,it transfers data to
the buffer,it returns the total number of
characters present in the string
*the local variables are also known as
auto variables
*union is an user defined data type
*structure is an user defined datatype....

You might also like