C

{"iq":[{"id":"1",
    "q":"What is C language?",
    "answer":" C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972.\nThe C programming language is a standardized programming language developed in the early 1970s by Ken Thompsonand Dennis Ritchie for use on the UNIX operating system.\nIt has since spread to many other operating systems,and is one of the most widely used programming languages.   "
  },
    {"id":"2",
      "q":"What are the types of constants in c?",
      "answer":"C constants can ba divided into two categories :\nPrimary constants\nSecondary constants "
    },
    {"id":"3",
      "q":"Why C language is still Useful?",
      "answer":"C provides efficiency, high performance, and high quality softwares, flexibility and power, many high-level and low-level operations like middle level, stability and small size code, provide functionality through rich set of function libraries, and gateway for other professional languages like C, C++, and Java."
    },

    {"id":"4",
      "q":" Where C language is used?",

      "answer":"Model: C is used for system software Compilers, Editors, embedded systems, data compression, graphics and computational geometry, utility programs, and databases, operating systems, device drivers, system level routines. There are zillions of lines of C legacy code. It is also used in application programs."
    },
    {"id":"5",
      "q":"How many stages are there in development of C language?",
      "answer":"There are four stages in development with C.\nEditing: Writing the source code by using some IDE or editor.\nPreprocessing or libraries: Already available routines.\nCompiling: Translates or converts source to object code for a specific platform       source code -> object code.\nLinking: Resolves external references and produces the executable module."
    },
    {"id":"6",
      "q":"How C language is different from Assembly language?",
      "answer":"Compared to assembly, C is high level (C has functions, while and for loops, etc.) and portable (only C compiler must be ported for each platform, all applications stay the same). "
    },

    {"id":"7",
      "q":"How many keywords are there in C language?",
      "answer":" The C programming language contains only 32 keywords. This makes it a small language when compared to others.\nIt is also very stable, fast, and has been so widely used that the syntax is the basis for many other languages such as c#, c++, and Perl.\nIn addition, C is considered one of the easiest languages to learn because of one basic philosophy: Programmers know what they are doing. "
    },

    {"id":"8",
      "q":"How many types of programming language translators are there?",
      "answer":"The programming language translators are classified as follows:\ni. Assembler\nii.  Compiler\niii. Interpreter"
    },
    {"id":"9",
      "q":"What is an Assembler? ",

      "answer":"An assembler translates the symbolic codes of programs of an assembly language into machine language instructions.\nThe symbolic language is translated to the machine code\nin the ratio of one is to one symbolic instructions to one machine code instructions.\nSuch types of languages are called low-level languages.\nThe assembler programs translate the low-level language to the machine code.\nThe translation job is performed either manually or with a program called assembler."
    },

    {"id":"10",
      "q":"What is a Compiler?",
      "answer":"Compilers are the translators, which translate all the instructions of the program into machine codes, which can be used again and again."
    },

    {"id":"11",
      "q":"What is Data Type?",

      "answer":"Data type is a set of data with values having predefined characteristics such as integers and characters. Storage representations and machine instructions to handle data types differ from machine to machine."
    },

    {"id":"12",
      "q":"How many data types are there in C?",
      "answer":"C data types can be divided into three types:\n1. Fundamental or Built-in data types (Primary Data Types).\n2. Derived data types (Secondary Data Types).\n3. User Defined data types."
    },
    {"id":"13",
      "q":"What are the built-in data types in C?",
      "answer":"The basic built-in or fundamental data types that are available in C are:\n1.    Int\n2.    Float\n3.    Double\n4.    Char"
    },

    {"id":"14",
      "q":"What are data type qualifiers?",
      "answer":"Data type qualifiers modify the behavior of variable type to which they are applied."
    },

    {"id":"15",
      "q":"How many types of data type qualifiers are there in C?",
      "answer":"Data type qualifiers can be classified into two types.\n1. Size qualifiers.\n2. Sign qualifiers.  "
    },

    {"id":"16",
      "q":" What are Derived Data Types?",
      "answer":"Derived data types in C Programming Language are those C data types which are derived from the fundamental data types using some declaration operators "
    },

    {"id":"17",
      "q":"How many types of Derived data types are there in C?",
      "answer":"The basic derived types that are available in C are:\n1. Array.\n2. Functions and pointers.\n3. Structures.\n4. Classes etc. "
    },
    {"id":"18",
      "q":"Explain about Array derived data type? ",
      "answer":"he arrays can be defined as a set of finite and homogeneous data elements. Each element of an array is referenced using an index.\nExample: If the name of an array is A which have 4 elements then the array will be represented as :A[0], A[1], A[2], A[3].\nHere, these subscripts which are containing the digit is known as an index. "
    },

    {"id":"19",
      "q":" Explain about Pointer derived data type?",
      "answer":" A pointer is a variable that holds the address of the memory space. If one variable can hold the address of the another variable then it is said that the first variable is pointing to the second. "
    },

    {"id":"20",
      "q":"How many classes of user defined data types are there?",
      "answer":"There are 2 classes of user defined data types.\n1.  Structure.\n2. Enumeration."
    },
    {"id":"21",
      "q":"What is Enum data type?",
      "answer":"Enum data type is a user defined data type having finite set of enumeration constants. The keyword 'enum' is used to create enumerated data type.\nSyntax:\nEnum [data type] {const1, const2…., const n};   "
    },
    {"id":"22",
      "q":"What is a conditional statement?",
      "answer":"Conditional Statement (also called Condition) is a feature of programming language , which allows it to perform actions depending upon some conditions provided by the programmer. Conditional statement controls the sequence of statements depending on the condition."
    },

    {"id":"23",
      "q":"What are the different types of conditional statements?",
      "answer":"The different types of conditional statements in C language are as follows:\n1.    if statement\n2.    if else statement\n3.    else if statement\n4.    nested if-else statement\n5.    switch statement\n6.    goto statement"
    },{"id":"24",
      "q":"What is if statement ?   ",
      "answer":"The if statement gives the user the choice of executing a statement (possibly compound) if the expression is evaluated to true or skipping it is the expression is evaluated to false.\nSyntax:\nAn if statement in C is generally in the following form:\nif (expression)\n{\nStatement;\n}\nThe statement is executed if and only if the expression is true."
    },{"id":"25",
      "q":"What is use of if-else statement?  ",
      "answer":"C language also lets one choose between two statements by using the if-else structure.\nSyntax:\nif (expression)\n{\nStatement 1\n}\nElse\n{\nStatement 2\n}\nIn this case, if the expression is true, then the statement 1 is executed.  Otherwise, statement 2 is executed."
    },{"id":"26",
      "q":"Write a program to demonstrate if-else statement?",
      "answer":"Example:\nif  (num > 20)\n{\nresult = 2 * num;\n}\nelse\n{\nresult = 3* num;\n}"
    },{"id":"27",
      "q":"What is \"Switch\" Statement .?",
      "answer":"This is a multiple or multiway brancing decision making statement. When we use nested if-else statement to check more than 1 conditions then the complexity of a program increases in case of a lot of conditions. Thus, the program is difficult to read and maintain. So to overcome this problem, C provides 'switch case'. Switch case checks the value of a expression against a case values, if condition matches the case values then the control is transferred to that point.\nSyntax:\nswitch (expression)\n{\ncase label1:\nstatements;\ncase label2:\nstatements;\nbreak;\n…\ncase label:\nstatements;\nbreak;\ndefault:\nstatements;\n}"
    },{"id":"28",
      "q":"Explain about goto statement in C?   ",
      "answer":"In C language, goto is an unconditional jump statement. This is a dangerous construct that can lead to highly confusing code.\nSyntax:\ngoto label:"
    },{"id":"29",
      "q":"What are the rules for declaring switch case? ",
      "answer":"The case label should be integer or character constant.\n•    Each compound statement of a switch case should contain break statement to exit from case.\n•    Case labels must end with (:) colon."
    },{"id":"30",
      "q":"What are the advantages of switch case?",
      "answer":"\n •    It is easy to use.\n •    It is easy to find out errors.\n •    Debugging is made easy in switch case.\n•    Complexity of a program is minimized."
    },{"id":"31",
      "q":"What is a pointer?   ",
      "answer":"Pointers are variables which stores the address of another variable. That variable may be a scalar (including another pointer), or an aggregate (array or structure). The pointed-to object may be part of a larger object, such as a field of a structure or an element in an array."
    },{"id":"32",
      "q":"What is the difference between arrays and pointers?",
      "answer":"Pointers are used to manipulate data using the address. Pointers use • operator to access the data pointed to by them.\nArrays is a collection of similar datatype. Array use subscripted variables to access and manipulate data. Array variables can be Equivalently written using pointer expression.  "
    },{"id":"33",
      "q":"What are the different storage classes in C?",
      "answer":"There are four types of storage classes.\nAutomatic\nExtern\nRegiter\nStatic "
    },{"id":"34",
      "q":"Define inheritance?",
      "answer":"Inheritance is the process by which objects of one class acquire properties of objects of another class. "
    },{"id":"35",
      "q":"What is a structure?",
      "answer":"Structure constitutes a super data type which represents several different data types in a single unit. A structure can be initialized if it is static or global."
    },{"id":"36",
      "q":"Define Constructors?",
      "answer":"A constructor is a member function with the same name as its class.\nThe constructor is invoked whenever an object of its associated class is created.\nIt is called constructor because it constructs the values of data members of the class. "
    },{"id":"37",
      "q":"What is the invalid pointer arithmetic?",
      "answer":"adding ,multiplying and dividing two pointers.\nShifting or masking pointer.\nAddition of float or double to pointer\nAssignment of a pointer of one type to a pointer of another type "
    },{"id":"38",
      "q":"What is the difference between the functions memmove() and memcpy()?",
      "answer":"The arguments of memmove() can overlap in memory. The arguments of memcpy() cannot."
    },{"id":"39",
      "q":"What is the difference between a string copy (strcpy) and a memory copy (memcpy)? ",
      "answer":"\nThe strcpy() function is designed to work exclusively with strings. It copies each byte of the source string to the destination string and stops when the terminating null character () has been moved.\nOn the other hand, the memcpy() function is designed to work with any type of data. Because not all data ends with a null character, you must provide the memcpy() function with the number of bytes you want to copy from the source to the destination."
    },{"id":"40",
      "q":"What is a pointer value and address? ",
      "answer":"A pointer value is a data object that refers to a memory location.\nEach memory location is numbered in the memory.\nThe number attached to a memory location is called the address of the location."
    },{"id":"41",
      "q":"What is the purpose of realloc()? ",
      "answer":"Realloc(ptr,n) function uses two arguments.\nThe first argument ptr is a pointer to a block of memory for which the size is to be altered.\nThe second argument n specifies the new size.The size may be increased or decreased."
    },{"id":"42",
      "q":"What is the difference between a NULL Pointer and a NULL Macro?",
      "answer":"Null pointer is a pointer that is pointing nothing while NULL macro will used for replacing 0 in program as #define NULL 0 ."
    },{"id":"43",
      "q":"What is an explicit constructor?",
      "answer":"A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.Explicit constructors are simply constructors that cannot take part in an implicit conversion."
    },{"id":"44",
      "q":"What is the difference between printf(...) and sprintf(...)?",
      "answer":"Sprintf(....) -------------> is standard output statement\nsprintf(......)-----------> is formatted output statement."
    },{"id":"45",
      "q":"What are the characteristics of arrays in C? ",
      "answer":"An array holds elements that have the same data type.\nArray elements are stored in subsequent memory locations\nTwo-dimensional array elements are stored row by row in subsequent memory locations.\nArray name represents the address of the starting element."
    },{"id":"46",
      "q":"What is indirection?",
      "answer":"If you have defined a pointer to a variable or any memory object, there is no direct reference to the value of the variable. This is called indirect reference. But when we declare a variable it has a direct reference to the value.   "
    },{"id":"47",
      "q":"What is the explanation for modular programming?",
      "answer":"The process of dividing the main program into executable subsection is called module programming. This concept promotes the reusability. "
    },{"id":"48",
      "q":"Is that possible to add pointers to each other?",
      "answer":"There is no possibility to add pointers together. Since pointer contains address details there is no way to retrieve the value from this operation. "
    },{"id":"49",
      "q":"Is there any possibility to create customized header file with C programming language? ",
      "answer":"It is possible and easy to create a new header file. Create a file with function prototypes that needs to use inside the program. Include the file in ‘#include’ section from its name.   "
    },{"id":"50",
      "q":"Is that possible to store 32768 in an int data type variable? ",
      "answer":"Int data type only capable of storing values between – 32768 to 32767.To store 32768 a modifier needs to use with int data type. Long Int can use and also if there is no any negative values unsigned int is also possible to use."
    },{"id":"51",
      "q":"Describe the modifier in C? ",
      "answer":"Modifier is a prefix to the basic data typewhich is used to indicate the modification forstorage space allocation to a variable.\nExample– In 32-bit processor storage space for int data type is 4.When we use it with modifier the storage space change as follows.\nLong int -> Storage space is 8 bit \nShort int -> Storage space is 2 bit   "
    },
    {"id":"52",
      "q":"Is it possible to use curly brackets ({}) to enclose single line code in C program?",
      "answer":"Yes, it is working without any error. Some programmers like to use this to organize the code. But the main purpose of curly brackets is to group several lines of codes. "
    },{"id":"53",
      "q":"Describe newline escape sequence with a sample program? ",
      "answer":"New line escape sequence is represented by \n. This indicates the point that new line need to start to the compiler and the output creates accordingly. Following sample program demonstrate the use of newline escape sequence. "
    },{"id":"54",
      "q":"What is pragma in C?",
      "answer":"#pragma is a pre processor macro in C.It is used to call a function before and after main function in a C program."
    },{"id":"55",
      "q":"What is header file in C language? ",
      "answer":"Header file is a file that contains functions declaration and macro definition for C in built library functions.\nAll C standard library functions are declared in many header files which are saved as file_name.h.\nWe are including these header files in our C program using \"#include\" command to make use of the functions those are declared in the header files.\nWhen we include header files in our C program using \"#include\" command, all c code of the header files are included in C program. Then, this C program is compiled by compiler and executed."
    },{"id":"56",
      "q":"What is type casting?",
      "answer":"Type casting is the process of converting the value of an expression to a particular data type.\nExample:\nint x,y;\nC=(float) x/y;\nWhere x and y are defined as integers. Then the result of x/y is converted into float."
    },{"id":"57",
      "q":"What is meant by Control String in Input/output Statements? ",
      "answer":"Control String contains the format code characters, specifies the type of data, that the user accessed within the Input/output statements."
    },{"id":"58",
      "q":"List out some keywords available in C language? ",
      "answer":"auto\ndouble\nint\nstruct\nbreak\nelse\nlong\nswitch\ncase\nenum\nregister\ntypedef\nchar\nextern\nreturn\nunion\nconst\nfloat\nshort\nunsigned\ncontinue\nfor\nsigned\nvoid\ndefault\ngoto\nsizeof\nvolatile\ndo\nif\nstatic\nwhile"
    },{"id":"59",
      "q":"What is keyword in C? ",
      "answer":"Keywords are pre-defined words in a C compiler. Each keyword is meant to perform a specific function in a C program.\nSince keywords are referred names for compiler, they can't be used as variable name."
    },{"id":"60",
      "q":"What is a string? ",
      "answer":"String is an array of characters. "
    },{"id":"61",
      "q":"What is the maximum length of an identifier?",
      "answer":"It is 32 characters ideally but implementation specific."
    },
    {"id":"62",
      "q":"What is the difference between getch() and getche()? ",
      "answer":"The getch() function reads a single character from keyboard. It doesn't uses any buffer, so entered data is not displayed on the output screen.\nThe getche() function reads a single character from keyword but data is displayed on the output screen. Press Alt+f5 to see the entered character."
    },
    {"id":"63",
      "q":"What is token? ",
      "answer":"Token is an identifier. It can be constant, keyword, string literal etc."
    },

    {"id":"64",
      "q":"What is the purpose of sprintf() function?",
      "answer":"It is used to print the formatted output into char array."
    },

    {"id":"65",
      "q":"What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?",
      "answer":"When Header file include within double quotes (“”), compiler search first in the working directory for the particular header file. If not found then in the built in the include path. But when Header file include within angular braces (<>), the compiler only search in the working directory for the particular header file."
    },
    {"id":"66",
      "q":"What is a sequential access file?",

      "answer":"In general programs store data into files and retrieve existing data from files. With the sequential access file such data saved in a sequential pattern. When retrieving data from such files each data need to read one by one until required information find"
    },

    {"id":"67",
      "q":"What is the significance of C program algorithms?",
      "answer":"The algorithm needs to create first and it contains step by step guidelines on how the solution should create. Also, it contains the steps to consider and the required calculations/operations within the program."
    },

    {"id":"68",
      "q":"What is heap?",

      "answer":"Heap is an area of memory from where is allocated at runtime using malloc() or calloc() functions."
    },

    {"id":"69",
      "q":"What is meant by recursive function?",
      "answer":"If a function calls itself again and again, then that function is called Recursive function. "
    },
    {"id":"70",
      "q":"What is a global variable?",
      "answer":"The global variable is a variable that is declared outside of all the functions.\nThe global variable is stored in memory, the default value is zero.\nScope of this variable is available in all the functions."
    },

    {"id":"71",
      "q":"What are linked lists?",
      "answer":"A linked list is composed of nodes that are connected with another.\nIn C programming linked lists are created using pointers.\nUsing linked lists is one efficient way of utilizing memory for storage."
    },

    {"id":"72",
      "q":"What is the difference between scanf() and gets() function?",
      "answer":"In scanf() when there is a blank was typed, the scanf() assumes that it is an end.\ngets() assumes the enter key as end."
    },

    {"id":"73",
      "q":"What is a syntax error?",
      "answer":" Syntax errors are associated with mistakes in the use of a programming language.\nIt may be a command that was misspelled or a command that must was entered in lowercase mode but was instead entered with an upper case character.\nA misplaced symbol or lack of symbol, somewhere within a line of code can also lead to syntax error."
    },

    {"id":"74",
      "q":"What are reserved words?",
      "answer":"Reserved words are words that are part of the standard C language library.\nThis means that reserved words have special meaning and therefore cannot be used for purpose other than what it is originally intended for.\nExamples of reserved words are int, void and return."
    },
    {"id":"75",
      "q":"What are the different data types available in C?",
      "answer":"There are four basic data types available in C,\nint\nfloat\nchar and\ndouble"
    },

    {"id":"76",
      "q":"What are *and & operators means?  ",
      "answer":" '*' operator means 'value at the address'.\n'&' operator means 'address of'."
    },

    {"id":"77",
      "q":"What is a Modulo Operator?",
      "answer":"'%' is a modulus operator. It gives the remainder of an integer division."
    },
    {"id":"78",
      "q":"What is conversion specification?",
      "answer":"The conversion specifications are used to accept or display the data using the INPUT/OUTPUT statements."
    },
    {"id":"79",
      "q":"Define a file?",
      "answer":"A file is the collection of interrelated data stored on the disk."
    },
    {"id":"80",
      "q":"What is the dynamic memory allocation?",
      "answer":"Allocating the memory at run time is called dynamic memory allocation."
    },{"id":"81",
      "q":"What is multiple inheritance? ",
      "answer":"A class can inherit properties from more than one class which is known as multiple inheritance."
    },{"id":"82",
      "q":"what is difference between function overloading and operator overloading?",
      "answer":"A function is overloaded when same name is given to different function.While overloading a function, the return type of the functions need to be the same."
    },{"id":"83",
      "q":"What are the advantages of inheritance?",
      "answer":"Code reusability\nSaves time in program development."
    },{"id":"84",
      "q":"What is dynamic array?",
      "answer":" The dynamic array is an array data structure which can be resized during runtime which means elements can be added and removed."
    },{"id":"85",
      "q":"What is a copy constructor and when is it called?",
      "answer":"A copy constructor is a method that accepts an object of the same class and copies it members to the object on the left part of assignement."
    },{"id":"86",
      "q":"Where is the auto variables stored?",
      "answer":"Auto variables can be stored anywhere, so long as recursion works.\nPractically, they’restored on the stack.\nIt is not necessary that always a stack exist.\nYou could theoretically allocate function invocation records from the heap."
    },
    {"id":"87",
      "q":"Define a class?",
      "answer":"A class represents description of objects that share same attributes and actions.\nIt defines the characteristics of the objects such as attributes and actions or behaviors.\nIt is the blue print that describes objects."
    },
    {"id":"88",
      "q":"What is Overriding?",
      "answer":"To override a method, a subclass of the class that originally declared the method must declare a method with the same name, return type (or a subclass of that return type), and same parameter list."
    },
    {"id":"89",
      "q":"What is a pointer variable? ",
      "answer":"A pointer variable is a variable that may contain the address of another variable or any valid address in the memory."
    },
    {"id":"90",
      "q":"What is message passing?",
      "answer":"An object oriented program consists of a set of objects that communicate with each other. Message passing involves specifying the name of the object, the name of the function and the information to be sent.   "
    },
  {"id":"91",
    "q":"What is a conditional statement?",
    "answer":"Conditional Statement (also called Condition) is a feature of programming language , which allows it to perform actions depending upon some conditions provided by the programmer. Conditional statement controls the sequence of statements depending on the condition."
  },
    {"id":"92",
      "q":"What is the purpose of realloc()? ",
      "answer":"Realloc(ptr,n) function uses two arguments.\nThe first argument ptr is a pointer to a block of memory for which the size is to be altered.\nThe second argument n specifies the new size.The size may be increased or decreased."
    },

    {"id":"93",
      "q":"What is a pointer value and address?",
      "answer":"A pointer value is a data object that refers to a memory location.\nEach memory location is numbered in the memory.\nThe number attached to a memory location is called the address of the location."
    },
    {"id":"94",
      "q":"What are the steps involved in program development life cycle?",
      "answer":"The following are the steps involved in designing the program.\nProgram designed\nProgram coding\nProgram testing and Debugging  "
    },
    {"id":"95",
      "q":"What are the differences between structures and union?",
      "answer":"A structure variable contains each of the named members, and its size is large enough to hold all the members. Structure elements are of same size.\nA Union contains one of the named members at a given time and is large enough to hold the largest member. Union element can be of different sizes."
    },
    {"id":"96",
      "q":"what is an abstract base class?",
      "answer":"An abstract class is a class that is designed to be specifically used as a base class. An abstract class contains at least one pure virtual function."
    },{"id":"97",
      "q":"What is the difference between #include‹ › and #include “ ”?  ",
      "answer":"#include‹ ›\nSpecifically used for built in header files.\n#include “ ”\nSpecifically used for used for user defined/created n header file."
    },{"id":"98",
      "q":"How do declare an array?",
      "answer":"We can declare an array by specify its data type, name and the number of elements the array holds between square brackets immediately following the array name.\nsyntax :\ndata_type array_name[size];"
    },{"id":"99",
      "q":"What is generic pointer in C?",
      "answer":"In C void* acts as a generic pointer. When other pointer types are assigned to generic pointer,conversions are applied automatically (implicit conversion)."
    },

    {"id":"100",
      "q":"How pointer variables are initialized?",
      "answer":"Pointer variables are initialized by one of the following ways.\nStatic memory allocation\nDynamic memory allocation  "
    }
  ]

}