‘C’ INTERVIEW QUESTIONS FOR FRESHER

‘C’ INTERVIEW QUESTIONS FOR FRESHER

‘C’ INTERVIEW QUESTIONS FOR FRESHER 1.What is C language? 2.Why is C known as a mother language? 3.Why is C called a mid-level programming language? 4.Who is the founder of C language? 5.When was C language developed? 6.What are the features of...

‘C’ INTERVIEW QUESTIONS FOR FRESHER 1.What is C language? 2.Why is C known as a mother language? 3.Why is C called a mid-level programming language? 4.Who is the founder of C language? 5.When was C language developed? 6.What are the features of the C language? 7.What is the use of printf() and scanf() functions? 8.What is the difference between the local variable and global variable in C? 9.What is the use of a static variable in C? 10.What is the use of the function in C? 11.What is the difference between call by value and call by reference in C? 12.What is recursion in C? 13.What is an array in C? 14.What is a pointer in C? 15.What is the usage of the pointer in C? 16.What is a NULL pointer in C? 17.What is a far pointer in C? 18.What is dangling pointer in C? 19.What is pointer to pointer in C? 20.What is static memory allocation? 21.What is dynamic memory allocation? 22.What functions are used for dynamic memory allocation in C language? 23.What is the difference between malloc() and calloc()? 24.What is the structure? 25.What is a union? 26.What is an auto keyword in C? 27.What is the purpose of sprintf() function? 28.Can we compile a program without main() function? 29.What is a token? 30.What is command line argument? 31.What is the acronym for ANSI? 32.What is the difference between getch() and getche()? 33.What is the newline escape sequence? 34.Who is the main contributor in designing the C language after Dennis Ritchie? 35.What is the difference between near, far and huge pointers? 36.What is the maximum length of an identifier? 37.What is typecasting? 38.What are the functions to open and close the file in C language? 39.Can we access the array using a pointer in C language? 40.Write a program to print "hello world" without using a semicolon? 41.Write a program to swap two numbers without using the third variable? 42.Write a program to print Fibonacci series without using recursion? 43.Write a program to print Fibonacci series using recursion? 44.Write a program to check prime number in C Programming? 45.Write a program to check palindrome number in C Programming? 46.Write a program to print factorial of given number without using recursion? 47.Write a program to print factorial of given number using recursion? 48.Write a program to check Armstrong number in C? 49.Write a program to reverse a given number in C? 50.What is a pointer on pointer? 51.Distinguish between malloc() & calloc() memory allocation. 52.What is keyword auto for? 53.What are the valid places for the keyword break to appear. 54.Explain the syntax for for loop. 55.What is difference between including the header file with-in angular braces < > and double quotes “ “ ? 56.How a negative integer is stored. 57.What is a static variable? 58.What is a NULL pointer? 59.What is the purpose of extern storage specifier? 60.Explain the purpose of the function sprintf(). 61.What is the meaning of base address of the array? 62.When should we use the register storage specifier? 63.What is a dangling pointer? 64.What is the purpose of the keyword typedef? 65.What is lvalue and rvalue? 66.What is the difference between actual and formal parameters? 67.Can a program be compiled without main() function? 68.What is the advantage of declaring void pointers? 69.Where an automatic variable is stored? 70.What is a nested structure? 71.What is the difference between variable declaration and variable definition? 72.What is a self-referential structure? 73.Does a built-in header file contains built-in function definition? 74.Explain modular programming. 75.What is a preprocessor? 76.Explain the use of %i format specifier w.r.t scanf(). 77.Does a break is required by default case in switch statement? 78.When to use -> (arrow) operator. 79.What are bit fields? 80.What are command line arguments? 81.What are the different ways of passing parameters to the functions? Which to use when? 82.What is the purpose of built-in stricmp() function. 83.Describe the file opening mode “w+”. 84.Where the address of operator (&) cannot be used? 85.Is FILE a built-in data type? 86.What is reminder for 5.0 % 2? 87.How many operators are there under the category of ternary operators? 88.Which key word is used to perform unconditional branching? 89.What is a pointer to a function? Give the general syntax for the same. 90.Explain the use of comma operator (,). 91.What is a NULL statement? 92.What is a static function? 93.Which compiler switch to be used for compiling the programs using math library with gcc compiler? 94.Which operator is used to receive the variable number of arguments for a function? 95.What is the problem with the following coding snippet? 96.Define an array. 97.What are enumerations? 98.Which built-in function can be used to move the file pointer internally? 99.What is a variable? 100.Who designed C programming language? 101.What is the full form of ANSI? 102.Which operator can be used to determine the size of a data type or variable? 103.Can we assign a float variable to a long integer variable? 104.Is 068 a valid octal number? 105.What it the return value of a relational operator if it returns any? 106.What is an infinite loop? 107.Can variables belonging to different scope have same name? If so show an example. 108.What is the default value of local and global variables? 109.Can a pointer access the array? 110.How do you construct an increment statement or decrement statement in C? 111.What is the difference between Call by Value and Call by Reference? 112.Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging? 113.What is the equivalent code of the following statement in WHILE LOOP format? for (a=1; a<=100; a++) printf ("%d\n", a * a); 114.What is a stack? 115.What is variable initialization and why is it important? 116.What is spaghetti programming? 117.Differentiate Source Codes from Object Codes 118.In C programming, how do you insert quote characters (' and ") into the output screen? 119.What is the use of a '\0' character? 120.What is the difference between the = symbol and == symbol? 121.What is the modulus operator? 122.What is a nested loop? 123.Which of the following operators is incorrect and why? ( >=, <=, <>, ==) 124.Compare and contrast compilers from interpreters. 125.How do you declare a variable that will hold string values? 126.Can the curly brackets { } be used to enclose a single line of code? 127.What are header files and what are its uses in C programming? 128.What is syntax error? 129.What are variables and it what way is it different from constants? 130.How do you access the values within an array? 131.Can I use "int" data type to store the value 32768? Why? 132.Can two or more operators such as \n and \t be combined in a single line of program code? 133.Why is it that not all header files are declared in every C program? 134.When is the "void" keyword used in a function? 135.What are compound statements? 136.What is the significance of an algorithm to C programming? 137.What is the advantage of an array over individual variables? 138.Write a loop statement that will show the following output: 1

12

123

1234

12345 139.What is wrong in this statement? scanf("%d",whatnumber); 140.How do you generate random numbers in C? 141.What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined? 142.What are comments and how do you insert it in a C program? 143.What is debugging? 144.What does the && operator do in a program code? 145.In C programming, what command or code can be used to determine if a number of odd or even? 146.What does the format %10.2 mean when included in a printf statement? 147.What are logical errors and how does it differ from syntax errors? 148.What are the different types of control structures in programming? 149.What is || operator and how does it function in a program? 150.Can the "if" function be used in comparing strings? 151.What are preprocessor directives? 152.What will be the outcome of the following conditional statement if the value of variable s is 10? 153.Describe the order of precedence with regards to operators in C. 154.What is wrong with this statement? myName = "Robin"; 155.How do you determine the length of a string value that was stored in a variable? 156.Is it possible to initialize a variable at the time it was declared? 157.Why is C language being considered a middle level language? 158.What are the different file extensions involved when programming in C? 159.What are reserved words? 160.What are linked list? 161.What is FIFO? 162.What are binary trees? 163.Not all reserved words are written in lowercase. TRUE or FALSE? 164.What is the difference between the expression "++a" and "a++"? 165.What would happen to X in this expression: X += 15; (assuming the value of X is 5) 166.In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE? 167.What is an endless loop? 168.What is a program flowchart and how does it help in writing a program? 169.What is wrong with this program statement? void = 10; 170.Is this program statement valid? INT = 10.50; 171.What are actual arguments? 172.What is a newline escape sequence? 173.What is output redirection? 174.What are run-time errors? 175.What is the difference between functions abs() and fabs()? 176.What are formal parameters? 177.What are control structures? 178.Write a simple code fragment that will check if a number is positive or negative. 179.When is a "switch" statement preferable over an "if" statement? 180.What are global variables and how do you declare them? 181.What are enumerated types? 182.What does the function toupper() do? 183.Is it possible to have a function as a parameter in another function? 184.What are multidimensional arrays? 185.Which function in C can be used to append a string to another string? 186.What is the difference between functions getch() and getche()? 187.Dothese two program statements perform the same output? 1) scanf("%c", &letter); 2) letter=getchar() 188.What are structure types in C? 189.What does the characters "r" and "w" mean when writing programs that will make use of files? 190.What is the difference between text files and binary files? 191.Is it possible to create your own header files? 192.What is dynamic data structure? 193.What are the different data types in C? 194.What is the general form of a C program? 195.What is the advantage of a random access file? 196.In a switch statement, what will happen if a break statement is omitted? 197.Describe how arrays can be passed to a user defined function 198.What are pointers? 199.Can you pass an entire structure to functions? 200.What is gets() function? 201.The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen? 202.How do you search data in a data file using random access method? 203.Are comments included during the compilation stage and placed in the EXE file as well? 204.Is there a built-in function in C that can be used for sorting data? 205.What are the advantages and disadvantages of a heap? 206.How do you convert strings to numbers in C? 207.Create a simple code fragment that will swap the values of two variables num1 and num2. 208.What is the use of a semicolon (;) at the end of every program statement? 209.What are the basic Datatypes supported in C Programming Language? 210.What do you mean by Dangling Pointer Variable in C Programming? 211.What do you mean by the Scope of the variable? What is the scope of the variables in C? 212.What are static variables and functions? 213.Differentiate between calloc() and malloc() 214.What are the valid places where the programmer can apply Break Control Statement? 215.How can we store a negative integer? 216.Differentiate between Actual Parameters and Formal Parameters. 217.Can a C program be compiled or executed in the absence of a main()? 218.What do you mean by a Nested Structure? 219.What is a C Token? 220.What is Preprocessor? 221.Why is C called the Mother of all Languages? 222.Mention the features of C Programming Language. 223.What is the purpose of printf() and scanf() in C Program? 224.What is an array? 225.What is /0 character? 226.What is the main difference between the Compiler and the Interpreter? 227.Can I use int datatype to store 32768 value?

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top 130 Android Interview Questions - Crack Technical Interview Now!

Top Android Interview Questions & Answers from Beginner to Advanced level. Get ready to crack your next android interview with these android interview questions

25 Most Common C Interview Questions & Answers [For Freshers]

C is a powerful general-purpose programming language that supports procedural, imperative, and structured paradigms. It is used for developing operating systems, databases, and application software for a wide range of computer architectures (PLCs, embedded systems, etc.). C is an excellent beginner-friendly language with an easy learning curve.

21 Most Read C++ Interview Questions & Answers [For Freshers]

Even today, C++ is as popular as it was back in the 80s. This general-purpose, compiled, and multi-paradigm (object-oriented, procedural, and functional) programming language plays a crucial role in the IT industry, particularly in software development.

PHP Interview Questions with Solutions: Prepare for PHP Interview

Prepare for PHP Interviews. Set Variable With php.ini File. Logic & Output Behind PHP Code Segment. Class Concept, Error & Functions in PHP. Start PHP Now!

Complete C++ Interview Questions & Answers

The article cover’s most commonly asked interview questions in c++ and a brief explanation of each question. Object-oriented programming is a programming paradigm based on the concept of “objects” of the classes, Objects may contain data in the form of fields and associated code in the form of methods. The objects can access their own procedures and can modify their data fields.