All questions
- What is Preprocessor? A Preprocessor Directive is considered as a built-in predefined function or macro that acts as a directive to the compiler and it gets execu... 1
- What is a C Token ? Keywords, Constants, Special Symbols, Strings, Operators, Identifiers used in C program are referred to as C Tokens. 1
- What do you mean by a Nested Structure? Answer: A nested structure is a structure that contains another structure (a structure variable) as one of its members. When one of the memb... 1
- Can a C program be compiled or executed in the absence of a main()? The program will be compiled but will not be executed. To execute any C program, main() is required. 1
- Differentiate between Actual Parameters and Formal Parameters. The Parameters which are sent from main function to the subdivided function are called as Actual Parameters and the parameters which are dec... 1
- How can we store a negative integer? To store a negative integer, we need to follow the following steps. Calculate the two’s complement of the same positive integer. Eg: 1011 (-... 1
- What are the valid places where the programmer can apply Break Control Statement? Break Control statement is valid to be used inside a loop and Switch control statements. 1
- Differentiate between calloc() and malloc() calloc() and malloc() are memory dynamic memory allocating functions. The only difference between them is that calloc() will load all the as... 1
- What are static variables and functions? The variables and functions that are declared using the keyword Static are considered as Static Variable and Static Functions. The variables... 2
- What do you mean by the Scope of the variable? What is the scope of the variables in C? Scope of the variable can be defined as the part of the code area where the variables declared in the program can be accessed directly. In C... 2
- What do you mean by Dangling Pointer Variable in C Programming? A Pointer in C Programming is used to point the memory location of an existing variable. In case if that particular variable is deleted and... 1
- What are the basic Datatypes supported in C Programming Language? The Datatypes in C Language are broadly classified into 4 categories. They are as follows: Basic Datatypes Derived Datatypes Enumerated Data... 1
- Design a flowchart for calculating the Simple Interest according to the value entered by the user. graph TD A([start]) --> B[/Input P, R , N/] --> C[ Calculate si = P*R*N /100] --> D[/Display si/] --> E([stop]) 1
- A crane 'A' lifts a heavy load in 5 seconds, whereas another crane 'B' does the same work in 2 seconds. Let the work done by both cranes be 'W' Given, Time taken by crane A to do work, t1 = 5 s Time taken by crane B to do work, t2 = 2 s PA : PB... 1
- A satellite revolves around a planet in a circular orbit. What is the work done by the satellite at any instant? The work done is zero because the centripetal force on the body at any instant is directed towards the centre of the circular path and the d... 1
- Define a kilowatt hour. How is it related to joule? One kilowatt hour is the electrical energy consumed by an electrical appliance of power 1 kilowatt when it is used for 1 hour. 1 kilowatt ho... 1
- Write the relationship between the S.I. and C.G.S. unit of moment of force. The S.I. and C.G.S. unit of moment of force are related as follows — 1 N m = 10 ⁵ dyne x 10 ² cm = 10 ⁷ dyne cm 1
- Define moment of force. The moment of force is equal to the product of the magnitude of the force and the perpendicular distance of the line of action of force from... 1
- write C program to print Hello World #include <stdio.h> int main(){ printf("Hello World"); return 0; } Program Output Hello World 1
- What are the advantages and disadvantages of a heap? Storing data on the heap is slower than it would take when using the stack. However, the main advantage of using the heap is its flexibility... 1
- How do you convert strings to numbers in C? You can write you own functions to do string to number conversions, or instead use C’s built in functions. You can use atof to convert to a... 1
- Create a simple code fragment that will swap the values of two variables num1 and num2. int temp; temp = num1; num1 = num2; num2 = temp; 2
- What is the use of a semicolon (;) at the end of every program statement? It has to do with the parsing process and compilation of the code. A semicolon acts as a delimiter, so that the compiler knows where each st... 1
- What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler The most probable reason behind this error is that the header file for that function was not indicated at the top of the program. Header fil... 1