GeekInterview.com
  I am new, Sign me up!
 
Home C

 

31 Articles.    Previous Page   Page 2 of 2
What is the difference between printf and sprintf sprintf Writes formatted data to a character string in memory instead of stdout Syntax of sprintf is include stdio.h> int sprintf char string const char format item item ... ; Here String refers to the pointer to a buffer in memory where the data is to be written. Format...
Category: C


What is sizeof operator sizeof will return the number of bytes reserved for a variable or data type. The sizeof operator is a compile-time operator that returns an integer value. In other words since sizeof is a compile time operator when used in a expression it does not get compiled into executable code in the expression. Syntax of this operator...
Category: C


What is Nonlocal Jump and Unconditional Jump longjmp and setjmp functions implement a nonlocal jump of program execution. longjmp" jumps to a program state previously recorded by setjmp" . Both longjmp and setjmp functions must have the header file given below included. include setjmp.h> When your program...
Category: C


How to assign values during declaration of variables Declaring variables tells the compiler the data type the variable is assigned and no storage area is allocated during this stage. It is possible to assign values during declaration itself. For example consider the following program main int a 50 b 18 5 ; printf a d...
Category: C


Why to avoid goto in C C has goto statement but one must ensure not to use too much of goto statement in their program because its functionality is limited and it is only recommended as a last resort if structured solutions are much more complicated. First let us understand the goto statement its syntax and functionality. The goto is a unconditional...
Category: C


How to swap two variables without using third variable A variable is a named location in memory that is used to store data which can be modified in a program. Let us learn how to swap two variables without using third variable. This can be done in number of ways By using arithmetic operators By using Bitwise operators By using Pointers...
Category: C


What is precedence of operators When number of operators occurs in an expression the operator which is to be evaluated first is judged by applying priority of operators. The arithmetic operators available in C are used for Addition - used for Subtraction used for Multiplication used for Division used for Modulus operation When...
Category: C


Operator Operand and Expression in C Operators are symbols which take one or more operands or expressions and perform arithmetic or logical computations. Types of operators available in C are as follows Arithmetic Assignment Logical relational Bitwise These have operators under each as follows Arithmetic Operators...
Category: C


How does a conversion occur in C The data types for numerical operations used in C are integer float. It is important to know how conversions occur between these two data types in numerical operations. Some of the facts about conversions are given below Integer having arithmetic operation with Integer gives Integer value Float having...
Category: C


What is the functionality and restrictions of Modulus Operator When a division is performed the remainder of the operation is given by modulus operator. The modulus operator is denoted in c by symbol . For instance we have two integer values x and y the operation x y called as x modulus y gives the result as x- x y y . If x 18 and...
Category: C


How does the prefix and postfix operator on expression The operators present in prefix and postfix are prefix increment operator denoted by prefix decrement operator denoted by -- postfix increment operator postfix decrement operator The difference between the two is that in the postfix notation the operator appears...
Category: C


31 Articles.    Previous Page   Page 2 of 2
 

Subscribe via RSS

Get Latest Knowledge Base Updates delivered directly to your Inbox...

Enter your email address:

Latest Knowledge Base Updates

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact  

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape