what is recursion in c language
Recursion is the process which comes into existence when a function calls a copy of itself to work on a smaller problem. Any function which calls itself is called recursive function, and such function calls are called recursive calls. Recursion involves several numbers of recursive calls. However, it is important to impose a termination condition of recursion. Recursion code is shorter than iterative code however it is difficult to understand.
Recursion cannot be applied to all the problem, but it is more useful for the tasks that can be defined in terms of similar subtasks. For Example, recursion may be applied to sorting, searching, and traversal problems.
where are pointers used in c language
The pointer in C language is a variable which stores the address of another variable. This variable can be of type int, char, array, function, or any other pointer. The size of the pointer depends on the architecture. However, in 32-bit architecture the size of a pointer is 2 byte.
The pointer in c language can be declared using * (asterisk symbol). It is also known as indirection pointer used to dereference a pointer.
file handling mechanism in c language
In programming, we may require some specific input data to be generated several numbers of times. Sometimes, it is not enough to only display the data on the console. The data to be displayed may be very large, and only a limited amount of data can be displayed on the console, and since the memory is volatile, it is impossible to recover the programmatically generated data again and again. However, if we need to do so, we may store it onto the local file system which is volatile and can be accessed every time. Here, comes the need of file handling in C.
File handling in C enables us to create, update, read, and delete the files stored on the local file system through our C program. The following operations can be performed on a file.
what is recursion in c language
Recursion is the process which comes into existence when a function calls a copy of itself to work on a smaller problem. Any function which calls itself is called recursive function, and such function calls are called recursive calls. Recursion involves several numbers of recursive calls. However, it is important to impose a termination condition of recursion. Recursion code is shorter than iterative code however it is difficult to understand.
Recursion cannot be applied to all the problem, but it is more useful for the tasks that can be defined in terms of similar subtasks. For Example, recursion may be applied to sorting, searching, and traversal problems.
cwhat are the basics required to learn c language
- Operators and Expressions
- Decision Making & Branching & Looping
- Meaning of all 32 keywords
- Understand what a linker and loader does
- Way in which the program gets executed and gets compiled
- Types of files created during the whole process
- C tokens(completely)
- Understand each word ,which is mentioned as C's features such as C is a ‘structured language', 'robust language',etc. All such things can be found out from above mentioned books.
- Input output operations and their management.
- Arrays, various operations on character arrays(i.e strings)
- Structures
- Functions
- Pointers
- File management
- Dynamic memory and its allocation
- Combination of arrays with pointers, functions
- Combination of pointers with functions
- Use of pointers.
- Flow of execution
- Storage class of variables
- Bit wise Operators
- Prepossor directives
- Other types of datatypes(such as linked list, trees,etc.)
control statements in c language
Hello Srikar,
Control Statements helps in control flow and smooth flow of the program
In C Language there are 4 Control Statements.
Jump statements
Selection statements
Decision making statements
Iteration statements
I hope this information was helpful to you.
All The Best!!
array in c language and array types
An array is defined as the collection of similar type of data items stored at contiguous memory locations. Arrays are the derived data type in C programming language which can store the primitive type of data such as int, char, double, float, etc. It also has the capability to store the collection of derived data types, such as pointers, structure, etc. The array is the simplest data structure where each data element can be randomly accessed by using its index number.
C array is beneficial if you have to store similar elements. For example, if we want to store the marks of a student in 6 subjects, then we don't need to define different variables for the marks in the different subject. Instead of that, we can define an array which can store the marks in each subject at the contiguous memory locations.
c language summary in cse btech
Hi,
C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system. The main features of the C language include low-level memory access, a simple set of keywords, and a clean style, these features make C language suitable for system programmings like an operating system or compiler development.
Many later languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language (Few programs may compile in C, but not in C++).
Thank You.
how c language works in coding
Hi,
The C programming language is incredibly popular, and it's easy to see why. Programming in C is efficient and gives the programmer a great deal of control. Many other programming languages like C++, Java and Python were developed using C.
Chances are increasing each day that if you're a programmer, you won't use C exclusively for your work. However, there are several learning C is highly beneficial, even if you don't use it regularly.
Thank You.
why should we learn c language
As we studied earlier, ‘C’ is a base language for many programming languages. So, learning ‘C’ as the main language will play an important role while studying other programming languages. It shares the same concepts such as data types, operators, control statements and many more. ‘C’ can be used widely in various applications. It is a simple language and provides faster execution. There are many jobs available for a ‘C’ developer in the current market.
‘C’ is a structured programming language in which program is divided into various modules. Each module can be written separately and together it forms a single ‘C’ program. This structure makes it easy for testing, maintaining and debugging processes.