Skip to main content

Shorts notes c language

 C is a general-purpose programming language developed in 1972 by Dennis Ritchie at  Bell Labs.

C is a compiled language, meaning that the code is converted into machine- readable format before execution.

C is low-level language, meaning that it provides a deal of control over hardware resources and memory allocation.

C is often used for system programming, embedded systems, and other application where performance and control are critical.

C is a procedural language, meaning that it follows a step-by-step approach to solving problems.

C supports a wide range of data types, including integers, floating-point numbers, characters, and arrays.

C provides a rich set of operators for performing mathematical and logical operations.

C includes standard libraries for performing common tasks, such as input/output operations and string manipulation.

C code is typically written in a text editor and complied using a C complier, such as GCC or clang.

C code can be run on a wide range of platforms, including Windows, Linux, and macOS.


C is a powerful general-purpose programming language that is widely used for developing various types of software applications. Here are some short notes on C:


Syntax: C programming language has a simple syntax that is easy to learn and understand.


Variables: In C, variables are used to store data values. Each variable has a specific data type, such as int, float, char, etc.


Data Types: C supports a wide range of data types, including integers, floating-point numbers, characters, and strings.


Operators: C provides various operators such as arithmetic, relational, logical, bitwise, etc. for performing operations on variables.


Control Structures: C provides various control structures such as if-else, switch-case, loops, etc. for controlling the flow of execution of a program.


Functions: In C, functions are used to break the program into smaller modules, making it easier to understand and debug.


Pointers: C provides pointers, which are variables that store memory addresses. Pointers are useful for dynamic memory allocation and accessing array elements.


Arrays: C supports arrays, which are collections of elements of the same data type. Arrays are useful for storing large amounts of data.


Structures: C supports structures, which are user-defined data types that can hold a collection of variables of different data types.


File Handling: C provides file handling functions, which allow programs to read and write data to files on the disk.


Overall, C is a powerful and flexible programming language that is widely used for developing various types of software applications, including system software, application software, and embedded software.


Comments

Popular posts from this blog

IMPORTANCE OF MANAGEMENT

 1. Management is an activity 2. Management is a purposeful activity. 3. Management is concerned with the efforts of a group. 4. Management applies economic principles. 5. Management involves decision making. 6. Management is getting things done through others. 7. Management is an integrating process. 8. Management co-ordinates all activities and resources. (i) Management is a universal activity. (ii) Management is dynamic not rigid.

Shorting Objective question for c language

1. Which of the following is the correct syntax for using the bubble sort algorithm in C? a. bubbleSort(int arr[], int n); b. void bubbleSort(int *arr, int n); c. int *bubbleSort(int arr[], int n); d. bubbleSort(int *arr); Answer: b. void bubbleSort(int *arr, int n); 2. Which sorting algorithm has the best average-case time complexity in C? a. Bubble Sort b. Insertion Sort c. Merge Sort d. Selection Sort Answer: c. Merge Sort 3. Which sorting algorithm is not an in-place sorting algorithm in C? a. Bubble Sort b. Heap Sort c. Insertion Sort d. Quick Sort Answer: b. Heap Sort 4. Which of the following is the correct time complexity of the Quick Sort algorithm in C? a. O(n) b. O(nlogn) c. O(n^2) d. O(logn) Answer: b. O(nlogn) 5. Which of the following is an example of a stable sorting algorithm in C? a. Bubble Sort b. Insertion Sort c. Quick Sort d. Shell Sort Answer: b. Insertion 6. Which of the following is not a valid variable type in C? a) int b) float c) char d) decimal Answer: d) d...

In c, Array objective question with option

1. What is an array in C? a) A collection of similar data items stored in contiguous memory locations. b) A collection of different data items stored in non-contiguous memory locations. c) A collection of similar data items stored in non-contiguous memory locations. d) A collection of different data items stored in contiguous memory locations. Answer: a) A collection of similar data items stored in contiguous memory locations. 2.What is the syntax to declare an array in C? a) dataType arrayName[arraySize]; b) dataType arraySize[arrayName]; c) arrayName[arraySize] dataType; d) arraySize[arrayName] dataType; Answer: a) dataType arrayName[arraySize]; 3.How do you access the first element of an array in C? a) arrayName[0]; b) arrayName[1]; c) arrayName[-1]; d) arrayName[first]; Answer: a) arrayName[0]; 4.What is the index of the last element of an array in C? a) arraySize; b) arraySize - 1; c) arraySize + 1; d) arraySize * 2; Answer: b) arraySize - 1; 5.Can you change the size of an array ...