·٠•ღ• CE Interviews Questions •ღ•٠·

·٠•ღ•ılılı•ღ•٠· Welcome To Inspire Study Materials ·٠•ღ•ılılı•ღ•٠·  


Note:- Dear Customer’s U Can Contact Me To Install The Specific Study Material Into Your PC As Listed Below.


·٠•ღ•ılılı CE Interviews Questions ılılı•ღ•٠·


  • General Questions For Computer Engineer:-

    Q:- What are your favourite subjects, besides Computer Science?
    Q:-What is a hidden bit?
    Q:-How does the screen terminal work?
    Q: Write a function that returns the factorial of a number.
    Q: What are data structures?
    Q: What are condition statements?
    Q: Define exception handling with example.
    Q: Name the operating systems you are familiar with.
    Q: What is the difference between a bug and a virus?
    Q: What is hyper threading (HT technology)?
    Q: Which programming language would you choose to make accounting software and why?
    Q: What is a database? How does it differ from data marts and data warehouses?
    Q: Explain the projects undertaken by you.
    Q: Write the code to sort an array of integers.
    Q: What is the difference between recursion and iteration?
    Q: What are the similarities between recursion and iteration?
    Q: What are constructors?
    Q:-What is Complier?
    Q:-What is booting System?
    Q:-What do You know About MIS?
    Q:-What is DBMS?
    Q:- What is Data Structure?
    Q:-What is Computer Network?
    Q:-What is Computer Virus?
    Q:-What is Dynamic RAM?
    Q:-What is CD and DVD?
  • Interview Questions and Answer of Programming C:-

    Interview questions and answer of Programming C

    Q:- What is C language?

    Ans:-The C programming language is a standardized programming language developed in the early 1970s by Ken Thompson and Dennis Ritchie for use on the UNIX operating system. It has since spread to many other operating systems, and is one of the most widely used programming languages. Cis prized for its efficiency, and is the most popular programming language for writing system software, though it is also used for writing applications.


    Q:-What is the difference between “printf(…)” and “sprintf(…)”?

    Ans:-sprintf(…) writesdata to the character arraywhereas printf(…) writesdata to the standard output device.


    Q:-What does static variable mean?

    Ans:-there are 3 main uses for the static. 1. If you declare within a function:
    It retains the value between function calls
    2.If it is declared for a function name:
    By default function is extern..so it will be visible from other files if the
    function declaration is as static..it is invisible for the outer files
    3. Static for global variables:
    By default we can use the global variables from outside files If it is
    static global..that variableis limited to with in the file


    Q:-Advantages of a macro over a function?

    Ans:-Macro gets to see the Compilation environment, so it can expand __ __TIME__ __FILE__ #defines. It is expanded by the preprocessor.
    For example, you can’t do this without macros
    #define PRINT(EXPR) printf( #EXPR “=%dn”, EXPR)
    PRINT( 5+6*7 ) // expands into printf(”5+6*7=%d”, 5+6*7 );
    You can define your mini language with macros:
    #define strequal(A,B) (!strcmp(A,B))
    Macros are a necessary evils of life. The purists don’t like them, but without it no real work gets done.


    Q:-What are the differences between malloc() and calloc()?

    Ans:-There are 2 differences. First, is in the number of arguments. malloc() takes a single argument(memory required in bytes), whilecalloc() needs 2 arguments(number of variables toallocate memory, size in bytes of a single variable). Secondly, malloc() does not initialize the memory allocated, whilecalloc()initializes the allocated memory to ZERO.


    Q:-Difference between const char* p and char const* p

    Ans:-You can’t, really. free() can , but there’s no way for your program to know the trick free() uses. Even if you disassemble the library and discover the trick, there’s no guarantee the trick won’t change with the next release of the compiler.


    Q:-Can a variable be both const and volatile?

    Ans:-Yes. The const modifier means that this code cannot change the value of the variable, but that does not mean that the value cannot be changed by means outside this code. For instance, in the example in FAQ 8, the timer structurewas accessed through a volatile const pointer. The function itself did not change the value of the timer, so itwas declared const. However, the valuewas changed by hardware on the computer, so itwas declared volatile. If a variable is both const and volatile, the two modifiers can appear in either order.


    Q:-What is the difference between text and binary modes?

    Ans:-Streamscan be classified into two types: text streams and binary streams. Text streamsare interpreted, with amaximum length of 255 characters. With text streams, carriage return/line feed combinationsare translated to the newline n character and vice versa. Binary streamsare uninterrupted andare treated one byte at a time with no translation of characters. Typically, a text stream would be used for reading and writing standard text files, printing output to the screen or printer, or receivinginput from the keyboard. A binary text stream would typically be used for reading and writing binary files such as graphics or word processing documents, reading mouse input, or reading and writing to the modem.


    Q:-What is static memory allocation and dynamic memory allocation?

    Ans:-Static memory allocation: The compiler allocates the required memory space for a declared variable.By using the address of operator,the reserved address is obtained and this address may be assigned to a pointer variable.Since most of the declared variable have static memory,this way of assigning pointer value to a pointer variable is known as static memory allocation. memory is assigned during compilation time.
    Dynamic memory allocation: It uses functions such as malloc( )orcalloc( ) to get memory dynamically.If thesefunctionsare used to get memory dynamically and the values returned by these functionsareassingned to pointer variables, such assignments are known as dynamic memory allocation.memory isassined during run time.


    Q:-How are pointer variables initialized?

    Ans:-Pointer variable are initialized by one of the following two ways
    – Static memory allocation
    – Dynamic memory allocation


    Q:-Difference between arrays and pointers?

    Ans:– Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them
    – Arraysusesubscriptedvariablesto access and manipulate data. Arrayvariablescan be equivalently written using pointer expression


    Q:-What is a method?

    Ans:-Method is a way of doing something, especially a systematic way; implies an orderly logical arrangement.


    Q:-What is indirection?

    Ans:-If you declare a variable, its name is a direct reference to its value. If you have a pointer to a variable, or any other object in memory, you have an indirect reference to its value.


    Q:-What is modular programming?

    Ans:-If a program is large, itis subdivided into a number of smaller programs thatare called modules orsubprograms. If a complex problemis solved using more modules, this approach is known as modular programming.


    Q:-How many levels deep can include files be nested?

    Ans:-Even though there is no limit to the number of levels of nested include files you can have, your compiler might run out of stack space while trying to include an inordinately high number of files. This number varies according to your hardware configuration and possibly your compiler.


    Q:-What is the difference between declaring a variable and defining a variable?

    Ans:-Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring itand also allocating space to hold the variable. You can also initialize a variableat the time itis defined.


    Q:-What is an lvalue?

    Ans:-Anlvalue is an expression to which a valuecan be assigned. Thelvalue expressionis located on the left side of an assignment statement, whereasan rvalue islocated on the right side of an assignment statement. Each assignment statement must havean lvalue and anrvalue. Thelvalue expressionmust reference a storable variable in memory. It cannot be a constant.


    Q:-Differentiate between an internal static and external static variable?

    Ans:-An internal static variableis declared inside a block with static storage classwhereas an external static variableis declared outside all the blocks in a file.An internal static variable has persistent storage,block scope and no linkage.An external static variable has permanent storage,file scope and internal linkage.


    Q:-What is the difference between a string and an array?

    Ans:-An array is an array of anything. A string is a specific kind of an array with a well-known convention to determine its length.
    There are two kinds of programming languages: those in which a string is just an array of characters, and those in which it’s a special type. In C, a string is just an array of characters (type char), with one wrinkle: a C string always ends with a NUL character.
    The “value” of an array is the same as the address of (or a pointer to) the first element; so, frequently, a C string and a pointer to char are used to mean the same thing.
    Anarraycan be any length. If it’s passed to a function, there’s no way the function can tell how long thearrayissupposedto be, unless someconventionis used. The convention for strings is NUL termination; the last character is an ASCII NUL (‘’) character.


    Q:-What is an argument? Differentiate between formal arguments and actual arguments?

    Ans:-An argument is an entity used to pass the data from calling function to the called function. Formal arguments are the arguments available in the function definition. Theyare preceded by their own data types. Actual arguments are available in the function call.


    Q:-What are advantages and disadvantages of external storage class?

    Advantages of external storage class
    1)Persistent storage of a variable retains the latest value
    2)The value is globally available
    Disadvantages of external storage class
    1)The storage for an external variable exists even when the variable is not needed
    2)The side effect may produce surprising output
    3)Modification of the program is difficult
    4)Generality of aprogramis affected


    Q:-What is a void pointer?

    Ans:-A void pointer is a C convention for a raw address. The compiler has no idea what type of object a void Pointer really points to. If you write int *ip;ip points to an int. If you write void *p; p doesn’t point to a void! In C and C++, any time you need a void pointer, you can use another pointer type. For example, if you have a char*, you can pass it to a function that expects a void*. You don’t even need to cast it. In C (but not in C++), you can use a void* any time you need any kind of pointer, without casting. (In C++, you need to cast it). A void pointeris used for working with raw memory or for passing a pointer to an unspecified type. Some C code operates on raw memory. When C was first invented, character pointers (char *)were used for that. Then people started getting confused about when a character pointer was a string, when it was a character array, and when it was raw memory.


    Q:-When should a type cast not be used?

    Ans:-A type castshould not be used to override a const or volatile declaration. Overriding these type modifiers can cause the program to fail to run correctly. A type castshould not be used to turn a pointer to one type of structure or data type into another. In the rare events in which this action is beneficial, using a union to hold the values makes the programmer’s intentions clearer.


    Q:-When is a switch statement better than multiple if statements?

    Ans:-A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type


    Q:-What is a static function?

    Ans:-A static function is a function whose scopeis limited to the current source file. Scope refers tothe visibility of a function or variable. If the function or variable is visible outside of the current source file, itis said to have global, or external, scope. If the function or variable is not visible outside of the current source file, itis said to have local, or static, scope.


    Q:-What is a pointer variable?

    Ans:-A pointer variable is a variable that may contain the address of another variable or any valid address in the memory.


    Q:-What is a pointer value and address?

    Ans:-A pointer value is a data object that refers to a memorylocation. Each memory locationis numbered in the memory. The number attached to a memory locationis called the address of the location.


    Q:-What is a modulus operator? What are the restrictions of a modulus operator?

    Ans:-A Modulus operator gives the remainder value. The result of x%y is obtained by (x-(x/y)*y). This operator is applied only to integral operands and cannot be applied to float or double.

Leave a comment