Skip to content
Tejsumeru

Thoughts Become Reality

  • Tutorials
  • Video Tutorial
  • Tutorials
  • Video Tutorial
  • Interview Quetions

    What are main characteristics of C language?

    December 15, 2019 - By tejsumeru.12@gmail.com

    C is a procedural language. The main features of C language include low-level access to memory, simple set of keywords, and clean style. These features make it suitable for system programming like operating system or compiler development.

    Continue Reading
  • Interview Quetions

    What is the difference between abs() and fabs() functions?

    December 15, 2019 - By tejsumeru.12@gmail.com

    Both functions are to retrieve absolute value. abs() is for integer values and fabs() is for floating type numbers. Prototype for abs() is under the library file < stdlib.h > and fabs() is under < math.h >.

    Continue Reading
  • Interview Quetions

    Describe static function with its usage?

    December 15, 2019 - By tejsumeru.12@gmail.com

    A function, which has a function definition prefixed with a static keyword is defined as a static function. The static function should call within the same source code. In C, functions are global by default. The “static” keyword before a function name makes it static. Unlike global functions in C, access to static functions is restricted to the file where they are declared. Therefore, when we want to restrict access to functions, we make them static. Another reason for making functions static can be reuse of the same function name in other files.

    Continue Reading
  • Interview Quetions

    What are local static variables? What is their use?

    December 15, 2019 - By tejsumeru.12@gmail.com

    A local static variable is a variable whose lifetime doesn’t end with a function call where it is declared. It extends for the lifetime of complete program. All calls to the function share the same copy of local static variables. Static variables can be used to count the number of times a function is called. Also, static variables get the default value as 0. For example, the following program prints “0 1” #include <stdio.h> void fun() { // static variables get the default value as 0. static int x; printf("%d ", x); x = x + 1; } int main()…

    Continue Reading
  • Interview Quetions

    What are reserved words with a programming language?

    December 15, 2019 - By tejsumeru.12@gmail.com

    The words that are part of the slandered C language library are called reserved words. Those reserved words have special meaning and it is not possible to use them for any activity other than its intended functionality. Example void, return int.

    Continue Reading
  • Interview Quetions

    What are the valid places for the keyword break to appear

    December 15, 2019 - By tejsumeru.12@gmail.com

    Break can appear only with in the looping control and switch statement. The purpose of the break is to bring the control out from the said blocks.

    Continue Reading
  • Interview Quetions

    What is the process to create increment and decrement stamen in C?

    December 15, 2019 - By tejsumeru.12@gmail.com

    There are two possible methods to perform this task. 1) Use increment (++) and decrement (-) operator. Example When x=4, x++ returns 5 and x- returns 3. 2) Use conventional + or – sign. When x=4, use x+1 to get 5 and x-1 to get 3.

    Continue Reading
  • Interview Quetions

    What is memory leak? Why it should be avoided.

    December 15, 2019 - By tejsumeru.12@gmail.com

    Memory leak occurs when programmers create a memory in heap and forget to delete it. Memory leaks are particularly serious issues for programs like daemons and servers which by definition never terminate. #include <stdlib.h> void f() { int* ptr = (int*)malloc(sizeof(int)); return; /* Return without freeing ptr*/ }  

    Continue Reading
  • Interview Quetions

    What is Dangling pointer?

    December 15, 2019 - By tejsumeru.12@gmail.com

    Dangling Pointer is a pointer that doesn’t point to a valid memory location. Dangling pointers arise when an object is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory. Following are examples. int* ptr = (int*)malloc(sizeof(int)); ..........................free(ptr); // ptr is a dangling pointer now and operations like following are invalid *ptr = 10; // or printf("%d", *ptr); int* ptr = NULL { int x = 10; ptr = &x; } // x goes out of scope and memory allocated to x is free now. //…

    Continue Reading
  • Interview Quetions

    What is the description for syntax errors?

    December 15, 2019 - By tejsumeru.12@gmail.com

    The mistakes when creating a program called syntax errors. Misspelled commands or incorrect case commands, an incorrect number of parameters when called a method /function, data type mismatches can identify as common examples for syntax errors.

    Continue Reading
 Older Posts
Newer Posts 

Categories

  • Android With Java
  • Android With Kotlin
  • C language
  • C++ Language
  • Data Structure
  • Error Solving
  • Flutter
  • Go Lang
  • Interview Quetions
  • Java
  • Javascript
  • Kotlin
  • Machine Learning
  • MATLAB
  • PHP
  • Python
  • SciPy
  • Tutorials
  • Wordpress
Graceful Theme by Optima Themes