Sie sind auf Seite 1von 22

1. When is a switch statement better than multiple if statements?

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

Latest Answer: If you have multiple options for a single variable then you
(Answers: 15) Read / Answer
can prefer switch to if-else statement.... Last Updated By aditya on July 26, 2007

2. What is the difference between goto and longjmp() and setjmp()? Subscribe
A goto statement implements a local jump of program execution, and the longjmp() and setjmp() functions implement a nonlocal, or far, jump of program execution.
Generally, a jump in execution of any
Latest Answer: using the normal goto statement we can move only within the function. it is
(Answers: 1) Read / Answer
not possible to go from ... Last Updated By nitin bhokare on October 03, 2005
3. What is an lvalue? Subscribe
An lvalue is an expression to which a value can be assigned. The lvalue expression is located on the left side of an assignment statement, whereas an rvalue is
located on the right side of an assignm
Latest Answer: lvalue of a assignement statement is always a variable it cant be
(Answers: 8) Read / Answer
expr. Assignement is storing of rv... Last Updated By vinayak on July 25, 2007
4. Array is an lvalue or not? Subscribe
An lvalue was defined as an expression to which a value can be assigned. Is an array an expression to which we can assign a value? The answer to this question
is no, because an array is composed of se
Latest Answer: The rvalue is the data value of the variable, that is, what
information it contains. The "r" in rval... Last Updated By Deepak kumar Prasad on (Answers: 2) Read / Answer
August 30, 2006
5. What is page thrashing? Subscribe
Some operating systems (such as UNIX or Windows in enhanced mode) use virtual memory. Virtual memory is a technique for making a machine behave as if it
had more memory than it really has, by using d
Latest Answer: Just ! A wonderful Explaination... Last Updated By arnabganguly
(Answers: 1) Read / Answer
on March 26, 2007
6. What is a const pointer? Subscribe

Latest Answer: a const pointer means the pointer which represents the address of
one value. so if you declare a poi... Last Updated By pradeep kumar v.v.n.k on (Answers: 4) Read / Answer
June 09, 2007
7. When should the register modifier be used? Does it really help? Subscribe
The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU’s registers, if possible, so that it can be accessed
faster. There are several restric

11. When should a type cast be used? Subscribe


There are two situations in which to use a type cast. The first use is to change the type of an operand to an arithmetic operation so that the operation will be
performed properly. The second c
Latest Answer: Type casting must be done weneever the data type of the variable
(Answers: 1) Read / Answer
to which u r gonna assign some valu... Last Updated By Priyakk on June 13, 2007
12. When should a type cast not be used? Subscribe
A type cast should 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 cast
should not be used to turn a poi
Latest Answer: we should not cast the big datatype to smaller one. Like from
double to float long to integer. TIn t... Last Updated By shivakumara.madegowda (Answers: 1) Read / Answer
on March 20, 2007
13. Is it acceptable to declare/define a variable in a C header? Subscribe
A global variable that must be accessed from more than one file can and should be declared in a header file. In addition, such a variable must be defined in one
source file. Variables should not be d
Latest Answer: A variable can be declare/define in a C Header without any kind of
compilational/ logical errors. Bu... Last Updated By Sivaram Prasad Nakkala on (Answers: 1) Read / Answer
November 28, 2005
14. What is the difference between declaring a variable and defining a variable? Subscribe
Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring it and also allocating space to
hold the variable. You can also
Latest Answer: int num;This statement is declaration and also defination since it
(Answers: 5) Read / Answer
also allocates memory for variabl... Last Updated By prabhu on May 05, 2007
15. What is the benefit of using const for declaring constants? Subscribe
The benefit of using the const keyword is that the compiler might be able to make optimizations based on the knowledge that the value of the variable will not
change. In addition, the compiler will t
Latest Answer: A side effect benefit:Say you want to pass an argument that you do
(Answers: 4) Read / Answer
not want mo... Last Updated By hurdjg on May 30, 2007
16. What is the easiest sorting method to use? Subscribe
The answer is the standard library function qsort(). It’s the easiest sort by far for several reasons: It is already written. It is already debugged. It has been optimized
as much as possible (usuall
Latest Answer: Greetings!can u plz explain me the sorting function with its
implementation in a small program and s... Last Updated By Venkatesan on March (Answers: 2) Read / Answer
26, 2006
17. What is the quickest sorting method to use? Subscribe
The answer depends on what you mean by quickest. For most sorting problems, it just doesn’t matter how quick the sort is because it is done infrequently or other
operations take significantly more ti
Latest Answer: The algorithms which follows divide and qunquer technique
(Answers: 1) Read / Answer
provides fastest implementation. ... Last Updated By suresh on April 19, 2007
18. How can I sort things that are too large to bring into memory? Subscribe
A sorting program that sorts items that are on secondary storage (disk or tape) rather than primary storage (memory) is called an external sort. Exactly how to sort
large data depends on what is mean
Read / Answer
19. What is the easiest searching method to use? Subscribe
Just as qsort() was the easiest sorting method, because it is part of the standard library, bsearch() is the easiest searching method to use. If the given array is in
the sorted order bsearch() is th
Read / Answer
20. What is the quickest searching method to use? Subscribe
A binary search, such as bsearch() performs, is much faster than a linear search. A hashing algorithm can provide even faster searching. One particularly
interesting and fast method for searching is
Latest Answer: quick short method is a best one... Last Updated By saravan on May 24, 2006

21. What is hashing? Subscribe


To hash means to grind up, and that’s essentially what hashing is all about. The heart of a hashing algorithm is a hash function that takes your nice, neat data and
grinds it into some random-looking
Latest Answer: hash is actually using a maping function to map the items to keys,
(Answers: 1) Read / Answer
if two different items map ... Last Updated By neverd on June 08, 2007
22. How can I sort a linked list? Subscribe
Both the merge sort and the radix sort are good sorting algorithms to use for linked lists.
Latest Answer: For this no need to write sepate function. We can arrage the
elements in order by using some comapri... Last Updated By venkatesh on May (Answers: 1) Read / Answer
19, 2006
23. How can I search for data in a linked list? Subscribe
Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially.
Sometimes it is quicker to take the data fro
Latest Answer: hai here am writing a simple ex for searchina linked list for specific
(Answers: 1) Read / Answer
valuestruct link{int data;str... Last Updated By rakesh on October 07, 2006
24. How do you redirect a standard stream? Subscribe
Most operating systems, including DOS, provide a means to redirect program input and output to and from different devices. This means that rather than your
program output (stdout) going to the screen
Read / Answer
25. How can you restore a redirected standard stream? Subscribe
The preceding example showed how you can redirect a standard stream from within your program. But what if later in your program you wanted to restore the
standard stream to its original state? By usi
Read / Answer
26. What is the difference between text and binary modes? Subscribe
Streams can be classified into two types: text streams and binary streams. Text streams are interpreted, with a maximum length of 255 characters. With text
streams, carriage return/line feed combinat
Latest Answer: Will you please explain how binary mode takes less memory?...
(Answers: 2) Read / Answer
Last Updated By pbchaudhari on August 01, 2007
27. How do you determine whether to use a stream function or a low-level function? Subscribe
Stream functions such as fread() and fwrite() are buffered and are more efficient when reading and writing text or binary data to files. You generally gain better
performance by using stream function
Read / Answer
28. How can I open a file so that other programs can update it at the same time? Subscribe
Your C compiler library contains a low-level file function called sopen() that can be used to open a file in shared mode. Beginning with DOS 3.0, files could be
opened in shared mode by loading a spe
Read / Answer
29. How can I make sure that my program is the only one accessing a file? Subscribe
By using the sopen() function you can open a file in shared mode and explicitly deny reading and writing permissions to any other program but yours. This task is
accomplished by using the SH_DENYWR s
Read / Answer
30. What is Preprocessor? Subscribe
The preprocessor is used to modify your program according to the preprocessor directives in your source code. Preprocessor directives (such as #define) give the
preprocessor specific instructions on
Latest Answer: Hi, preprocessor is a program which processes our source program before it goes to the c... Last Updated By supriya ahire on March 18, 2006

31. What is a macro, and how do you use it? Subscribe


A macro is a preprocessor directive that provides a mechanism for token replacement in your source code. Macros are created by using the #define statement.
Here is an example of a macro: Macros
Read / Answer
32. What will the preprocessor do for a program? Subscribe
The C preprocessor is used to modify your program according to the preprocessor directives in your source code. A preprocessor directive is a statement (such as
#define) that gives the preprocessor s
Read / Answer
33. How can you avoid including a header more than once? Subscribe
One easy technique to avoid multiple inclusions of the same header is to use the #ifndef and #define preprocessor directives. When you create a header for your
program, you can #define a symbolic nam
Read / Answer
34. Can a file other than a .h file be included with #include? Subscribe
The preprocessor will include whatever file you specify in your #include statement. Therefore, if you have the line #include <macros.inc> in your program, the file
macros.inc will be incl
Latest Answer: no... Last Updated By kaushik on July 11, 2007 (Answers: 1) Read / Answer
35. What is the benefit of using #define to declare a constant? Subscribe
Using the #define method of declaring a constant enables you to declare a constant in one place and use it throughout your program. This helps make your
programs more maintainable, because you need t
Latest Answer: #define is used for declaring constants.if we use #define the value
(Answers: 1) Read / Answer
of that constant is directly rep... Last Updated By sundar on November 03, 2006
36. What is the benefit of using an enum rather than a #define constant? Subscribe
The use of an enumeration constant (enum) has many advantages over using the traditional symbolic constant style of #define. These advantages include a lower
maintenance requirement, improved program
Read / Answer
37. How are portions of a program disabled in demo versions? Subscribe
If you are distributing a demo version of your program, the preprocessor can be used to enable or disable portions of your program. The following portion of code
shows how this task is accomplished,
Read / Answer
38. Is it better to use a macro or a function? Subscribe
The answer depends on the situation you are writing code for. Macros have the distinct advantage of being more efficient (and faster) than functions, because their
corresponding code is inserted dire
Read / Answer
39. What is the difference between #include and #include “file”? Subscribe
When writing your C program, you can include files in two ways. The first way is to surround the file you want to include with the angled brackets < and >. This
method of inclusion tells the pr
Latest Answer: hi, #include searches the file in the specified list of director...
(Answers: 1) Read / Answer
Last Updated By supriya ahire on March 20, 2006
40. Can you define which header file to include at compile time? Subscribe
Yes. This can be done by using the #if, #else, and #endif preprocessor directives. For example, certain compilers use different names for header files. One such
case is between Borland C++, which use

41. Can include files be nested? Subscribe


Yes. Include files can be nested any number of times. As long as you use precautionary measures , you can avoid including the same file twice. In the past,
nesting header files was seen as bad progra
Read / Answer
42. How can type-insensitive macros be created? Subscribe
A type-insensitive macro is a macro that performs the same basic operation on different data types. This task can be accomplished by using the concatenation
operator to create a call to a type-sensit
Read / Answer
43. What are the standard predefined macros? Subscribe
The ANSI C standard defines six predefined macros for use in the C language: Macro Name Purpose _ _LINE_ _ Inserts the current source code line number in
your code. _ _FILE_ _ Inserts the current sou
Read / Answer
44. What is a pragma? Subscribe
The #pragma preprocessor directive allows each compiler to implement compiler-specific features that can be turned on and off with the #pragma statement. For
instance, your compiler might support a f
Latest Answer: consider an examplestruct a{char a;int b;char c;};sizeof struct a is
12 instead of 6if we decl... Last Updated By soma praveen kumar on March 29, (Answers: 1) Read / Answer
2007
45. How do you override a defined macro? Subscribe
You can use the #undef preprocessor directive to undefine (override) a previously defined macro.
Read / Answer
46. How can you check to see whether a symbol is defined? Subscribe
You can use the #ifdef and #ifndef preprocessor directives to check whether a symbol has been defined (#ifdef) or whether it has not been defined (#ifndef).
Read / Answer
47. What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each Subscribe
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
The 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.
Read / Answer
48. How can I convert a number to a string? Subscribe
The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa The following
functions can be used to con
Latest Answer: sprintf() is used to convert integer to string.... Last Updated By
(Answers: 2) Read / Answer
dasam on March 29, 2007
49. How can I convert a string to a number? Subscribe
The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa. The following
functions can be used to co
Latest Answer: /*Let take an example*/main(){char rasmi="111";int
ranjan;ranjan=atoi(rasmi);printf("... Last Updated By rasmiranjanbabu on July 05, (Answers: 1) Read / Answer
2007
50. How do you print only part of a string? Subscribe
/* Use printf() to print the first 11 characters of source_str. */ printf(“First 11 characters: ‘%11.11s’n”, source_str);

51. What is indirection? Subscribe


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.
Read / Answer
52. How many levels of pointers can you have? Subscribe
The answer depends on what you mean by “levels of pointers.” If you mean “How many levels of indirection can you have in a single declaration?” the answer is
“At least 12.” int i = 0; int *ip01 = &am
Read / Answer
53. What is a null pointer? Subscribe
There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in <stddef.h>, has a value that’s guaranteed to be
different from any valid pointer
Latest Answer: hi, Null pointer: When referring to computer memory, a null
(Answers: 1) Read / Answer
pointer is a com... Last Updated By supriya ahire on March 22, 2006
54. What is a void pointer? Subscribe
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;
Latest Answer: Void Pointer or Generic Pointer is the one to which any datatype
(Answers: 1) Read / Answer
can be assigned.eg.main(){ &nb... Last Updated By Ashwan on July 26, 2007
55. Is NULL always defined as 0? Subscribe
NULL is defined as either 0 or (void*)0. These values are almost identical; either a literal zero or a void pointer is converted automatically to any kind of pointer, as
necessary, whenever a pointer
Read / Answer
56. What does it mean when a pointer is used in an if statement? Subscribe
Any time a pointer is used as a condition, it means “Is this a non-null pointer?” A pointer can be used in an if, while, for, or do/while statement, or in a conditional
expression.
Read / Answer
57. Can you add pointers together? Why would you? Subscribe
No, you can’t add pointers together. If you live at 1332 Lakeview Drive, and your neighbor lives at 1364 Lakeview, what’s 1332+1364? It’s a number, but it doesn’t
mean anything. If you try to perform
Latest Answer: one can only increment the pointer bt no one can add two
(Answers: 1) Read / Answer
pointer.... Last Updated By umesh ram sharma on September 03, 2006
58. How do you use a pointer to a function? Subscribe
The hardest part about using a pointer-to-function is declaring it. Consider an example. You want to create a pointer, pf, that points to the strcmp() function. The
strcmp() function is declare
Read / Answer
59. When would you use a pointer to a function? Subscribe
Pointers to functions are interesting when you pass them to other functions. A function that takes function pointers says, in effect, “Part of what I do can be
customized. Give me a pointer to a func
Read / Answer
60. Why should we assign NULL to the elements (pointer) after freeing them? Subscribe
This is paranoia based on long experience. After a pointer has been freed, you can no longer use the pointed-to data. The pointer is said to “dangle”; it doesn’t
point at anything useful. If you “NUL

61. Is it better to use malloc() or calloc()? Subscribe


Both the malloc() and the calloc() functions are used to allocate dynamic memory. Each operates slightly different from the other. malloc() takes a size and returns
a pointer to a chunk of memory at
Read / Answer
62. What is the difference between far and near? Subscribe
As described at the beginning of this chapter, some compilers for PC compatibles use two types of pointers. near pointers are 16 bits long and can address a
64KB range. far pointers are 32 bits long
Latest Answer: atthe time of 8086 , the processor operate in real modebt after that
as more processor develop then ... Last Updated By umesh ram sharma on (Answers: 1) Read / Answer
September 03, 2006
63. When should a far pointer be used? Subscribe
Sometimes you can get away with using a small memory model in most of a given program. There might be just a few things that don’t fit in your small data and
code segments. When that happens, you can
Read / Answer
64. What is the stack? Subscribe
The stack is where all the functions’ local (auto) variables are created. The stack also contains some information used to call and return from functions. A “stack
trace” is a list of which functions
Latest Answer: Please tell me, how I can extract stack information(runtime) of the
(Answers: 3) Read / Answer
code being executed using C... Last Updated By Syed on June 21, 2007
65. Can the size of an array be declared at runtime? Subscribe
No. In an array declaration, the size must be known at compile time. You can’t specify a size that’s known only at runtime. For example, if i is a variable, you can’t
write code like this: char array
Latest Answer: If you need this type of behavior, you have to use dynamic
memory.You can try this:void main(){ ... Last Updated By M. PAVAN KUMAR (Answers: 1) Read / Answer
REDDY on January 18, 2007
66. What is the heap? Subscribe
The heap is where malloc(), calloc(), and realloc() get memory. Getting memory from the heap is much slower than getting it from the stack. On the other hand, the
heap is much more flexible than the
Read / Answer
67. What is the difference between NULL and NUL? Subscribe
NULL is a macro defined in <stddef.h> for the null pointer. NUL is the name of the first character in the ASCII character set. It corresponds to a zero value. There’s
no standard macro NUL in C
Read / Answer
68. What is a “null pointer assignment” error? What are bus errors, memory faults, and core Subscribe
What is a “null pointer assignment” error? What are bus errors, memory faults, and core dumps?
These are all serious errors, symptoms of a wild pointer or subscript. Null pointer assignment is a message you might get when an MS-DOS program finishes
executing. Some such programs can arrange for
Read / Answer
69. How can you determine the size of an allocated portion of memory? Subscribe
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 cha
Read / Answer
70. Can math operations be performed on a void pointer? Subscribe
No. Pointer addition and subtraction are based on advancing the pointer by a number of elements. By definition, if you have a void pointer, you don’t know what it’s
pointing to, so you don’t know the

71. How do you print an address? Subscribe


The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void pointer (void*). Different compilers might print a pointer with
different formats. Your com
Latest Answer: I tried both %p and %Fp. There is no difference, atleast in MS
visual studio. Both are printing the ... Last Updated By paulson paul (Answers: 2) Read / Answer
chambakottukudyil on April 24, 2006
72. Why should I prototype a function? Subscribe
A function prototype tells the compiler what kind of arguments a function is looking to receive and what kind of return value a function is going to give back. This
approach helps the compiler ensure
Latest Answer: int foo(int); // This is func. prototype//Below is func. definitionint
(Answers: 1) Read / Answer
foo(int param) { int ret_val;... Last Updated By Have_Phun on February 03, 2007
73. What is a static function? Subscribe
A static function is a function whose scope is limited to the current source file. Scope refers to the visibility of a function or variable. If the function or variable is
visible outside of the curr
Latest Answer: Which static variables that are only accesed by static functions you
(Answers: 5) Read / Answer
are talking abt? ... Last Updated By pbchaudhari on July 31, 2007
74. Is it possible to execute code even after the program exits the main() function? Subscribe
The standard C library provides a function named atexit() that can be used to perform “cleanup” operations when your program terminates. You can set up a set of
functions you want to perform automati
Read / Answer
75. Is using exit() the same as using return? Subscribe
No. The exit() function is used to exit your program and return control to the operating system. The return statement is used to return from a function and return
control to the calling function. If
Latest Answer: no both r not same because exit()->this function work is to end the
program completelyretur... Last Updated By R.S.Jayasatahyanarayanan on (Answers: 1) Read / Answer
December 27, 2006
76. Can the sizeof operator be used to tell the size of an array passed to a function? Subscribe
No. There’s no way to tell, at runtime, how many elements are in an array parameter just by looking at the array parameter itself. Remember, passing an array to a
function is exactly the same as pass
Latest Answer: The comment is incorrect, the original answer is correct.In C,
(Answers: 2) Read / Answer
passing an array as a parameter does ... Last Updated By yba on July 09, 2007
77. Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted a Subscribe
Is it better to use a pointer to navigate an array of values,or is it better to use a subscripted array name?
It’s easier for a C compiler to generate good code for pointers than for subscripts.
Read / Answer
78. What is the difference between a string and an array? Subscribe
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 i
Latest Answer: An array is collection of simillar(any data type like char, int, float
(Answers: 2) Read / Answer
..etc) , string is an array i... Last Updated By Abhai on May 26, 2007
79. what is a modulus operator? What are the restrictions of a modulus operator? Subscribe
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.
Latest Answer: Since the modulus operator produces the remainder it cannot (Answers: 1) Read / Answer
accept float or double values. Usually ... Last Updated By rajesh on June 25, 2006
80. why n++ executes faster than n+1? Subscribe
The expression n++ requires a single machine instruction such as INR to carry out the increment operation whereas, n+1 requires more instructions to carry out
this operation.
Latest Answer: n++ takes more than one instruction, ++n is faster. n++ has to store n, increment the variable and r... Last Updated By romainn on June 14,
2007

81. Write the equivalent expression for x%8? Subscribe


x&7 Write expressions to swap two integers without using a temporary variable?
Latest Answer: swapping of two variables:-int a=10;int b=20;a=a+b;b=a-b;a=a-b;
(Answers: 6) Read / Answer
[:)]... Last Updated By Arijit on July 27, 2007
82. What is storage class and what are storage variable ? Subscribe
A storage class is an attribute that changes the behavior of a variable. It controls the lifetime, scope and linkage.There are five types of storage classes 1)auto
2)static 3)e
Read / Answer
83. What are the advantages of auto variables? Subscribe
1)The same auto variable name can be used in different blocks2)There is no side effect by changing the values in the blocks3)The memory is economically
used 4)Auto variables have inherent protect
Latest Answer: auto variable have initial value as garbage.auto int and int are one
(Answers: 1) Read / Answer
and the same.... Last Updated By vinod on March 06, 2005
84. Diffenentiate between an internal static and external static variable? Subscribe
An internal static variable is declared inside a block with static storage class whereas an external static variable is declared outside all the blocks in a file.An
internal static variable has persis
Read / Answer
85. What are advantages and disadvantages of external storage class? Subscribe
Advantages of external storage class1)Persistent storage of a variable retains the latest value2)The value is globally available Disadvantages of external storage
class1)The storage for an external
Read / Answer
86. Differentiate between an external variable definition and external variable declaration S.No& Subscribe
Differentiate between an external variable definition and external variable declaration S.No External Variable DefinitionExternal Variable
Declaration1It creates variablesIt refers to the variable already defined2It allocates memoryIt does not allocates memory3The keyword extern is not
usedThe keyword extern is used4It can be initializedIt can not be initialized5It appears only onceIt can be declared in many places6It must be outside
all the blocks

Read / Answer
87. Differentiate between a linker and linkage? Subscribe
A linker converts an object code into an executable code by linking together the necessary build in functions. The form and place of declaration where the variable
is declared in a program determine
Read / Answer
88. What are the characteristics of arrays in C? Subscribe
1) An array holds elements that have the same data type 2) Array elements are stored in subsequent memory locations3) Two-dimentional array elements ar
Latest Answer: Array: can be defined as a group of elements stored in contigous
memory locations and all elements h... Last Updated By Basavaraj Yadwad on (Answers: 2) Read / Answer
May 24, 2006
89. When does the compiler not implicitly generate the address of the first element of an array? Subscribe
Whenever an array name appears in an expression such asØ array as an operand of the sizeof operatorØ array as an operand of & operatorØ
Read / Answer
90. What is modular programming? Subscribe
If a program is large, it is subdivided into a number of smaller programs that are called modules or subprograms. If a complex problem is solved using more
modules, this approach is known as mo

91. What is a function and built-in function? Subscribe


A large program is subdivided into a number of smaller programs or subprograms. Each subprogram specifies one or more actions to be performed for a large
program.such subprograms are functions.
Latest Answer: C program uses Both built in function and function(which is also
(Answers: 1) Read / Answer
called user defined)&n... Last Updated By supriya ahire on March 23, 2006
92. What is an argument ? differentiate between formal arguments and actual arguments? Subscribe
An argument is an entity used to pass the data from calling funtion to the called funtion. Formal arguments are the arguments available in the funtion
definition.They are preceded by their own data t
Latest Answer: The actual arguments are the arguments with which the function
can be called. The formal arguments a... Last Updated By venkatesh on May 18, (Answers: 1) Read / Answer
2006
93. What is the purpose of main( ) function? Subscribe
The function main( ) invokes other functions within it.It is the first function to be called when the program starts execution.Ø It is the starting functionØ
Latest Answer: IT IS A SPECIAL TYPE OF FUNCTION, NOT A USER DEFIENED
FUNCTION.... Last Updated By DEEPAK KUMAR MAHAPATRA(TCS KOCHI) on (Answers: 2) Read / Answer
November 22, 2006
94. What are the advantages of the functions? Subscribe
Ø Debugging is easierØ It is easier to understand the logic involved in the programØ Testing is easierØ &
Read / Answer
95. what is a method? Subscribe
a way of doing something, especially a systematic way; implies an orderly logical arrangement (usually in steps)
Read / Answer
96. What is a pointer value and address? Subscribe
A pointer value is a data object that refers to a memory location. Each memory locaion is numbered in the memory.The number attached to a memory location is
called the ad
Latest Answer: Hi,int *ptr=123;so ptr is pointer varible. suppose the adress of ptr is
(Answers: 1) Read / Answer
2002( Ass... Last Updated By subbu malepati on December 03, 2006
97. What is a pointer variable? Subscribe
A pointer variable is a variable that may contain the address of another variable or any valid address in the memory.
Latest Answer: pointervariable is a variable that can hold the address of variable
and it is act as a a... Last Updated By R.S.Jayasathyanarayanan on December 27, (Answers: 1) Read / Answer
2006
98. Are pointers integers? Subscribe
No, pointers are not integers.A pointer is an address.It is merely a positive number and not an integer.
Latest Answer: You can think a pointer as an unsigned integer as addresses are
always unsigned integers... Last Updated By M. PAVAN KUMAR REDDY on (Answers: 2) Read / Answer
January 18, 2007
99. How are pointer variables initialized? Subscribe
Pointer variable are initialized by one of the following two waysØ Static memory allocation Ø&nbs
Read / Answer
100. What is static memory allocation and dynamic memory allocation? Subscribe
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 assi
Latest Answer: main(){if(true){int a;int b;}else{int c;int d;}getch();}here in the above program, memory is allocat... Last Updated By kiran on April 26, 2007
101. What is the purpose of realloc( )? Subscribe
the function realloc(ptr,n) uses two arguments.the first argument ptr is a pointer to a block of memory for which the size is to be altered.The second argument n
specifies the new size.The size may b
Latest Answer: The main purpose of the realloc is to reallocation the memory
aquired by any variable.In between u w... Last Updated By BRN Prasad on March (Answers: 1) Read / Answer
13, 2006
102. Diffence arrays and pointers? Subscribe
Ø Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by themØ Arrays use subscrip
Latest Answer: It is important when ever anyone asks uArray elements are always
stored in contiguous memory locatio... Last Updated By Bobby on September 14, (Answers: 2) Read / Answer
2006
103. Which expression always return true? Which always return false? Subscribe
expression if (a=0) always return false expression if (a=1) always return true
Latest Answer: Irrespective of the value of a variable a, a^a always return FALSE
(0)!(a^a) always return TRUE (1)... Last Updated By Sivaram Prasad Nakkala on (Answers: 3) Read / Answer
November 28, 2005
104. How many levels deep can include files be nested? Subscribe
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. Thi
Latest Answer: q-2... Last Updated By c++ on April 08, 2005 (Answers: 1) Read / Answer
105. Can static variables be declared in a header file? Subscribe
You can’t declare a static variable without defining it as well (this is because the storage class modifiers static and extern are mutually exclusive). A static variable
can be defined in a header fi
Latest Answer: If you make a global variable as static, it does not mean it can not
(Answers: 4) Read / Answer
access outside that class.With ... Last Updated By Ekta Goel on May 03, 2007
106. Difference between Funtion to pointer and pointer to function Subscribe

Latest Answer: hi please find the difference between function to pointer and
pointer to functionfunction to pointer... Last Updated By madhu on December 06, (Answers: 3) Read / Answer
2006
107. What is #line used for? Subscribe
The #line preprocessor directive is used to reset the values of the _ _LINE_ _ and _ _FILE_ _ symbols, respectively. This directive is commonly used in fourth-
generation languages that generate C lan
Latest Answer: Dear Sir, I am a Computer Science Lecturer. Really 'C' Ques &
Ans are very useful for us. ... Last Updated By A.ASHIQ MOHAMMED on July 07, (Answers: 1) Read / Answer
2005
108. Can a variable be both const and volatile? Subscribe
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
Latest Answer: But isnt like the constant variables will be stored by in ROM (read
(Answers: 5) Read / Answer
only memory).Then how can the so... Last Updated By Pradeepa on July 31, 2006
109. how to reverse a sentence Subscribe
Asked by: a
Latest Answer: Program.....#include#include#includevoid main(){char *... Last
(Answers: 5) Read / Answer
Updated By Harshdev Joshi on March 16, 2007
110. All the programs Programs run are tested under Turbo C/C++ compilers. It is assumed that, Subscribe
All the programs are tested under Turbo C/C++ compilers. It is The underlying machine is an¬ Programs run under DOS environment,¬assumed
that, Program is compiled using Turbo C/C++ compiler.The program output¬x86 system, may depend on the information based on this assumptions
(for example sizeof(int) == 2 may be assumed). Predict the output or error(s) for the following:i) void main(){ int const * p=5; printf("%d",++(*p));}
Answer: Compiler error: Cannot modify a constant value. Explanation: p is a pointer to a "constant integer". But we tried to change the value of the "constant
integer". Asked by: Beena

111. ii) main(){ char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ Subscribe
ii) main(){ char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);}
mmmm aaaa nnnnExplanation:s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally array name is the base address for tha Asked by:
Beena
Read / Answer
112. iii) main(){ float me = 1.1; double you = 1.1; if(me==you)printf("I love U");else printf Subscribe
iii) main(){ float me = 1.1; double you = 1.1; if(me==you)printf("I love U");else printf("I hate U");}
I hate UExplanation:For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the
precession with of the value represented vari Asked by: Beena
Read / Answer
113. iv) main() { static int var = 5; printf("%d ",var--); if(var) main(); } Subscribe
5 4 3 2 1 Explanation:When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function
calls. Main is also treated Asked by: Beena
Read / Answer
114. v) main(){ int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j Subscribe
2 2 2 2 2 2 3 4 6 5 Explanation: Initially pointer c is assigned to both p and q. In the first loop, since only q is incremented and not c , the value 2 will be printed 5
times. In second loo Asked by: Beena
Read / Answer
115. vi) main(){ extern int i; i=20;printf("%d",i);} Subscribe
Linker Error : Undefined symbol '_i'Explanation: extern storage class in the following declaration, extern int i;specifies to the compiler that the memory for i i Asked
by: Beena
Read / Answer
116. vii)7. main(){ int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j Subscribe
vii)7. main(){ int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m);}
0 0 1 3 1Explanation :Logical operations always give a result of 1 or 0 . And also the logical AND (&&) operator has higher priority over the logical OR (||) operator.
So the expression ‘i++ && j++ & Asked by: Beena
Read / Answer
117. viii) main(){ char *p; printf("%d %d ",sizeof(*p),sizeof(p));} Subscribe
1 2Explanation:The sizeof() operator gives the number of bytes taken by its operand. P is a character pointer, which needs one byte for storing its value (a
character). Hence sizeof(*p) gives a value Asked by: Beena
Latest Answer: ans is 1 & 2 bcoz *p is pointing to some char data which must be 1
(Answers: 3) Read / Answer
byte and size(p) is 2 byte bcoz i... Last Updated By aniljoo on February 12, 2007
118. ix) main(){ int i=3; switch(i) { default:printf("zero"); case 1: printf("on Subscribe
ix) main(){ int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
threeExplanation :The default case can be placed anywhere inside the loop. It is executed only when all other cases doesn't match. Asked by: Beena
Read / Answer
119. x) main(){ printf("%x",-1 Subscribe
fff0Explanation :-1 is internally represented as all 1's. When left shifted four times the least significant 4 bits are filled with 0's.The %x format specifier specifies that
the integer value be prin Asked by: Beena
Latest Answer: Depending on the machine implementation it will result in FFFFFF0
(Answers: 1) Read / Answer
(for 32bit ) or FFF0 (16 bit ) ... Last Updated By xeejam on November 18, 2005
120. what is pointer? Subscribe
pointer is used to store the address of given variable Asked by: madhu
Latest Answer: A pointer is a variable, which contains the address of another variable... Last Updated By Priya on August 03, 2006

121. How to perform matrix multiplication using Double linked lists? Subscribe
Asked by: shanti
Latest Answer: http://www.codeproject.com/cpp/sparse_matrices.asp... Last
(Answers: 2) Read / Answer
Updated By Ritesh Patel on November 19, 2005
122. if compiler for c is written in c language, which is used to complie the compiler? Subscribe
Asked by: venu
Latest Answer: The first C compiler was likely written in the B language. The
(Answers: 3) Read / Answer
developers were so influenced b... Last Updated By yba on July 10, 2007
123. What is the difference between#include< >and#include" " Subscribe
Asked by: siva prasad
Latest Answer: #include #include "filename"both of which cause a new file to be
(Answers: 5) Read / Answer
read at the point w... Last Updated By ashutosh_dasgupta on April 29, 2006
124. what is the output of the followint -c- code#define square(a) (a*a)main(){printf("%d",squ Subscribe
what is the output of the followint -c- code#define square(a) (a*a)main(){printf("%d",square(4+5));}
Asked by: pvrajesh
Read / Answer
125. How can you get the number of elements in an array allocated dynamically at runtime? For example -i Subscribe
How can you get the number of elements in an array allocated dynamically at runtime? For example -int *p = (int *) malloc(sizeof(int) * n);int
numElems = ??????? /* n is not available here */
Asked by: Ashutosh
Read / Answer
126. How can send unlimited no of arguments to a function, eg printf function can take any no of argumen Subscribe
How can send unlimited no of arguments to a function, eg printf function can take any no of arguments
Asked by: cshivaprasad
Read / Answer
127. what is the draw back in using friend function in c++ Subscribe
Asked by: venkatesh
Latest Answer: check this FAQ listhttp://www.parashift.com/c++-faq-
(Answers: 3) Read / Answer
lite/friends.html#faq-14.3... Last Updated By muthu kumar k on March 27, 2006
128. In the following code, in which order the functions would be called?x = f1(23,14)*f2(12/4)+f3();a) Subscribe
In the following code, in which order the functions would be called?x = f1(23,14)*f2(12/4)+f3();a) f1, f2, f3 b) f3, f2, f1c) The order may vary from
compiler to compiler d) None of the above
Choose the correct option Asked by: Lokesh M
Read / Answer
129. What is the type of the variable b in the following declaration?#define FLOATPTR float*FLOATPTR a,b Subscribe
What is the type of the variable b in the following declaration?#define FLOATPTR float*FLOATPTR a,b;a) float b) float pointer c) int d) int pointer
Choose the correct option Asked by: Lokesh M
Read / Answer
130. A switch statement cannot includea) constants as arguments b) constant expression as argumentsc) st Subscribe
A switch statement cannot includea) constants as arguments b) constant expression as argumentsc) string as an argument d) None of the above
Choose the correct option Asked by: Lokesh M

131. what do you mean by normalisation of pointers Subscribe


Asked by: manish
Latest Answer: Normalization functions are provided which take any of these
combined types as their first argument,... Last Updated By Ahtesham Ali on June (Answers: 1) Read / Answer
20, 2006
132. How to convert Stack in to Queue and v varsa ? c with data structure. Subscribe
Asked by: manojchambarge
Latest Answer: Had it been vice versa queue to stack it would have been done
easily by keeping the front pointer fi... Last Updated By abhi1983 on June 26, (Answers: 1) Read / Answer
2006
133. main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } Subscribe
A) Runtime error. Access violationB) Compile error. Illegal syntaxC) None of the aboveD) Runtime errorExplanation: printf( ) prints address/garbage of i, scanf()
dont have & sign, so scans address for
Latest Answer: answer is A) Runtime error. Access violation.... Last Updated By
(Answers: 8) Read / Answer
dev07 on June 11, 2006
134. main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } Subscribe
A) Gets into Infinite loopB) Compile error. Illegal syntaxC) None of the aboveD) Runtime error.Explanation: illegal syntax for using return
Latest Answer: agree with above...return is not an expressionB) Compile error.
(Answers: 3) Read / Answer
Illegal syntax... Last Updated By vishal on March 27, 2006
135. main(){ int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("n %d", i);} Subscribe
A) Some Integer not 100B) 100C) Runtime error.D) None of the aboveExplanation: Output = 0
Latest Answer: Yes, Compile and run by Dev-C++. Output is garbage (i see
(Answers: 6) Read / Answer
1120403456 in output window).... Last Updated By bipi2g on June 28, 2007
136. main(){ int i = 0xff ; printf("n%d", i Subscribe
A) 1020B) 512C) 4D) 1024
Latest Answer: f=15 in hex equivalent...so the number is (15*16power0)+
(15*16power1) = 255....and <<2 would ... Last Updated By Prasad.... on January (Answers: 2) Read / Answer
18, 2006
137. #define SQR(x) x * xmain(){ printf("%d", 225/SQR(15));} Subscribe
A) 15B) 225C) 1D) none of the above
Latest Answer: In algebra * has higher precedence than /, but in C they have the
(Answers: 7) Read / Answer
same precedence, and are left-asso... Last Updated By yba on July 10, 2007
138. union u{ struct st { int i : 4; &nb Subscribe
union u{ struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i;}u;main(){ u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l);}
A) 40, 4, 0B) 100, 4, 0C) 0, 0, 0D) 4, 4, 0
Read / Answer
139. union u{ union u { int i; int j; }a[10]; int b[10];}u;main(){ print Subscribe
union u{ union u { int i; int j; }a[10]; int b[10];}u;main(){ printf("n%d", sizeof(u)); printf(" %d", sizeof(u.a));// printf("%d", sizeof(u.a[4].i));}
A) None of the AboveB) 1, 100, 1C) 40, 4, 4D) 4, 4, 4Explanation: 20, 200, error for 3rd printf
Read / Answer
140. main(){ int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p pri Subscribe
main(){ int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p}
A) Compile errorB) 1.00000C) Runtime error.D) 0.00000Explanation: Error because i/(*p) is 25/25 i.e 1 which is int & printed as a float, so abnormal program
termination, runs if (float) i/(*p) -----
141. main(){ int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); prin Subscribe
main(){ int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j);}
A) Compile errorB) 0, 0C) Runtime error.D) the first two values entered by the userExplanation: two values entered, 3rd will be null pointer assignment
Read / Answer
142. main(){ char *p = "hello world"; p[0] = 'H'; printf(" Subscribe
main(){ char *p = "hello world"; p[0] = 'H'; printf("%s", p);}
A) Compile errorB) “Hello world”C) Runtime error.D) “hello world”
Read / Answer
143. main(){ char * strA; char * strB = I am OK; memcpy( strA, strB, 6);} Subscribe
A) Compile errorB) I am OKC) Runtime error.D) I am OExplanation: I am OK is not within " "
Latest Answer: Its the Runtime error as strA hasnt been allocated any memory ...
(Answers: 3) Read / Answer
Last Updated By vikas on April 27, 2006
144. How will you print % character? Subscribe
A) printf(“%%”)B) printf(“\%”)C) printf(“%”)D) printf(“%%”)
Latest Answer: printf("%%");o/p=%... Last Updated By R.Ramakrishna on April
(Answers: 6) Read / Answer
22, 2006
145. const int perplexed = 2;#define perplexed 3main(){ #ifdef perplexed #undef perplexed #defi Subscribe
const int perplexed = 2;#define perplexed 3main(){ #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed);}
A) none of the aboveB) 4C) 2D) 0
Read / Answer
146. struct Foo{ char *pName;};main(){ struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); Subscribe
struct Foo{ char *pName;};main(){ struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName);}
A) NameB) compile errorC) Your NameD) Runtime error
Read / Answer
147. struct Foo{ char *pName; char *pAddress;};main(){ struct Foo *obj = malloc(sizeof(struct Foo)) Subscribe
struct Foo{ char *pName; char *pAddress;};main(){ struct Foo *obj = malloc(sizeof(struct Foo));clrscr(); obj->pName = malloc(100); obj->pAddress =
malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj-
>pAddress);}
A) Your Name Your NameB) Your Address, Your AddressC) Your Name, Your AddressD) None of the aboveExplanation: Prints Nothing, as after free(obj), no
memory is there containing obj->pName & pbj->pAddre
Read / Answer
148. main(){ char *a = "Hello "; char *b = "World";clrscr(); printf(& Subscribe
main(){ char *a = "Hello "; char *b = "World";clrscr(); printf("%s", strcat(a,b));}
A) HelloWorldB) Hello WorldC) HelloD) None of the above
Read / Answer
149. main(){ char *a = "Hello "; char *b = "World"; clrscr(); pr Subscribe
main(){ char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b));}
A) None of the aboveB) “HelloWorld”C) “Hello World”D) “Hello”Explanation: World, copies World on a, overwrites Hello in a.
Read / Answer
150. void func1(int (*a)[10]){ printf("Ok it works");}void func2(int a[][10]){ printf( Subscribe
void func1(int (*a)[10]){ printf("Ok it works");}void func2(int a[][10]){ printf("Will this work?");} main() { int a[10][10]; func1(a); func2(a);}
A) Ok it worksWill this work?B) Will this work?C) Ok it worksD) None of the above
Read / Answer

Previous View page 11 12 13 14 [ 15 ] 16 17 18 19 20 Next

151. main(){ printf("%d, %d", sizeof('c'), sizeof(100));} Subscribe


A) 4, 100B) 2, 100C) 2, 2D) 4, 4
Latest Answer: Answer is compiler dependent. ... Last Updated By paulson
(Answers: 9) Read / Answer
paul chambakottukudyil on April 19, 2006
152. main(){ int i = 100; clrscr(); printf("%d", sizeof(sizeof(i)));} Subscribe
A) none of the aboveB) 4C) 100D) 2
Latest Answer: Internal sizeof(i) gives output 2.2 is integer so outer sizeof()again
(Answers: 3) Read / Answer
gives output 2.... Last Updated By Gaurav Bhatnagar on December 28, 2005
153. main(){ int c = 5; printf("%d", main||c);} Subscribe
A) none of the aboveB) 0C) 5D) 1Explanation: if we use main|c then error, illegal use of pointer
Latest Answer: Here || operator is used, which returns 1 when first operand is not
(Answers: 4) Read / Answer
zero, without evaluating s... Last Updated By Preetham on September 26, 2006
154. main(){ char c; int i = 456; clrscr(); c = i; printf("%d", c);} Subscribe
A) none of the aboveB) random numberC) -456D) 456Explanation: Answer is -56
Latest Answer: See.........converting 456 to binary, we get 111001000.it takes more
than one byte. Se when we assig... Last Updated By paulson paul (Answers: 2) Read / Answer
chambakottukudyil on April 19, 2006
155. void main (){ int x = 10; printf ("x = %d, y = %d", x,--x++);} Subscribe
A) none of the aboveB) 10, 11C) 10, 9D) 10, 10Explanation: L value required
Latest Answer: Lvalue requiredprogram will not run... Last Updated By navin on (Answers: 4) Read / Answer
July 29, 2006
156. main(){ int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf(" Subscribe
main(){ int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i);}
A) 20, 9, 19, 10B) 20, 9, 20, 10C) 20, 10, 20, 10D) 19, 9, 20, 10
Read / Answer
157. main(){ int x=5; clrscr(); for(;x==0;x--) { printf("x=%dn”", x--); }} Subscribe
A) none of the aboveB) 0, 1, 2, 3, 4C) 1, 2, 3, 4, 5D) 4, 3, 2, 1, 0Explanation: prints nothing, as condition x==0 is False
Latest Answer: It printfs nothing .. since the condition x==0 never satisfies and the
(Answers: 3) Read / Answer
for loop never executes :)... Last Updated By dasam on March 30, 2007
158. main(){ int x=5; for(;x!=0;x--) { printf("x=%dn", x--); }} Subscribe
A) 5, 3, 1B) 4, 3, 2, 1, 0C) 5, 4, 3, 2,1D) none of the aboveExplanation: Infinite loop as x is decremented twice, it never be 0 and loop is going on & on
Latest Answer: Infinite LOOPx is never equal to zero... Last Updated By raj on
(Answers: 3) Read / Answer
July 30, 2006
159. main(){ int x=5; clrscr(); for(;x Subscribe
A) 5, 3, 1, -1, 3B) 5, 2, 1C) 5, 3, 1D) None of the aboveExplanation: prints nothing, as condition in loop is false.
Latest Answer: main(){int x=5;clrscr();for(;x>= 0;x--){printf("x=%d ", x--);}}this is the
(Answers: 2) Read / Answer
correct way to print t... Last Updated By jasana_2006 on December 25, 2006
160. main(){ { unsigned int bit=256; printf("%d", bit); } { unsigned int Subscribe
main(){ { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); }}
A) 256, 512B) 512, 512C) 256, 256D) Compile errorExplanation: because these are different blocks, so declaration is allowed.

161. main(){ int i; clrscr(); for(i=0;i Subscribe


A) 1, 2, 4, 8, 16B) 0, 1, 2, 4, 8C) 0, 1, 2, 3, 4D) 5, 4, 3, 2, 1Explanation: L does't make any diff.
Latest Answer: ans is A. because l means it always assign to 1.... Last Updated By
(Answers: 1) Read / Answer
satyam on March 13, 2006
162. main(){ signed int bit=512, i=5; for(;i;i--) { printf("%dn", bit = (bit >> (i Subscribe
main(){ signed int bit=512, i=5; for(;i;i--) { printf("%dn", bit = (bit >> (i - (i -1)))); }}
A) 128, 64, 32, 16, 8B) 256, 128, 64, 32, 16C) 512, 256, 128, 64, 32D) 64, 32, 16, 8, 4
Read / Answer
163. main(){ signed int bit=512, i=5; for(;i;i--) { printf("%dn", bit >> (i - (i - Subscribe
main(){ signed int bit=512, i=5; for(;i;i--) { printf("%dn", bit >> (i - (i -1))); }}
A) 512, 512, 512, 512, 512B) 256, 256, 0, 0, 0C) 512, 256, 0, 0, 0D) 256, 256, 256, 256, 256Explanation: bit's value is not changed
Read / Answer
164. main(){ if (!(1&&0)) { printf("OK I am done."); } else { printf("OK Subscribe
main(){ if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); }}
A) none of the aboveB) compile errorC) OK I am goneD) OK I am done
Read / Answer
165. main(){ if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf(&quo Subscribe
main(){ if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); }}
A) none of the aboveB) compile errorC) OK I am goneD) OK I am done
Read / Answer
166. main(){ signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bi Subscribe
main(){ signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); }}
A) 0, -513B) 512, 0C) 0, 513D) 0, 0
Read / Answer
167. Point out error, if any, in the following program main() { int i=1; Subscribe
Point out error, if any, in the following program main() { int i=1; switch(i) { case 1: printf("nRadioactive cats have 18 half-
lives"); &n
A) No errorB) Runtime errorC)
Read / Answer
168. What would be the output of the following program? main() { int i=4; Subscribe
What would be the output of the following program? main() { int i=4; switch(i) { default: printf("n A mouse is an elephant built by
the Japanese"); case 1: &nb
A) a) A mouse is an elephant built by the Japanese B) b) Breeding rabbits is a hare raising experience C) c) A mouse is an elephant built by the Japanese
Breeding rabbits is a hare raising experienceD
Read / Answer
169. What is the output of the following program?#define SQR(x) (x*x)main(){ int Subscribe
What is the output of the following program?#define SQR(x) (x*x)main(){ int a,b=3; a= SQR(b+2); printf("%d",a);}
A) 25B) 11C) ErrorD) Garbage Value
Read / Answer
170. In which line of the following, an error would be reported? 1. #define CIRCUM(R) (3.14*R*R); 2. mai Subscribe
In which line of the following, an error would be reported? 1. #define CIRCUM(R) (3.14*R*R); 2. main() 3. { 4. float r=1.0,c; 5. c= CIRCUM(r); 6.
printf("n%f",c); 7. if(CIRCUM(r))==6.28) 8. printf("nGobbledygook"); 9. }
A) Line 1B) Line 5C) Line 6D) Line 7
181. If the following program (myprog) is run from the command line as myprog friday tuesday sunday, Wha Subscribe
If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char
*argv[]) { printf("%c",*++argv[1]); }
A) rB) fC) mD) y
Read / Answer
182. Would the following program compile? main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf(&q Subscribe
Would the following program compile? main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("n%u%u",j,k); }
A) YesB) No
Read / Answer
183. According to ANSI specifications which is the correct way of declaring main() when it receives comm Subscribe
According to ANSI specifications which is the correct way of declaring main() when it receives command line arguments?
A) main(int argc, char *argv[]) B) main(argc,argv) int argc; char *argv[];C) main() {int argc; char *argv[]; }D) None of the above
Read / Answer
184. What would be the output of the following program? main() { const int x=5; int *ptrx; ptrx=&x; Subscribe
What would be the output of the following program? main() { const int x=5; int *ptrx; ptrx=&x; *ptrx=10; printf("%d",x); }
A) 5B) 10C) ErrorD) Garbage Value
Read / Answer
185. What is use of macro arguments in c? what is major difference between normal macro definition and m Subscribe
What is use of macro arguments in c? what is major difference between normal macro definition and macro arguments.
Asked by: D.S.Varadha Rajan
Read / Answer
186. write a code for implementation of doubly linked list with use of single pointer in each node Subscribe
Asked by: arati_nayak2000
Latest Answer: Hi,I agree with Ashtosh , since linked list nodes are stored
dynamically in memory wherever it has s... Last Updated By Xavier Raj on May (Answers: 7) Read / Answer
09, 2006
187. Why don\'t we add null pointer at the end of array of integer?How can we calculate the length Subscribe
Why don\'t we add null pointer at the end of array of integer?How can we calculate the length of array of integer?
Asked by: gau_bhatnagar
Read / Answer
188. how argc and argv works in the following main function?main(int argc,char *argv[]) { int n,i=0; w Subscribe
how argc and argv works in the following main function?main(int argc,char *argv[]) { int n,i=0; while(argv[1][i]!=\'\\0\') { n=fun(); i++;} printf(\
Asked by: kevin
Read / Answer
189. How to write a program such that it will delete itself after exectution? Subscribe
Asked by: vidya sagar
Latest Answer: #include #include int main(int argc, char * * argv)
{remove(argv[0]);return EXIT_SUCCESS;}in unix... Last Updated By harish on (Answers: 7) Read / Answer
September 17, 2006
190. what are storage class in c Subscribe
Asked by: arshad_arshadkk
Latest Answer: Actually there are only two storage Classe........its given in K & R...
(Answers: 6) Read / Answer
Last Updated By Mahananda R.Biradar on May 12, 2006
191. c is a structural or highlevel or middle level language which one is correct answer Subscribe
Asked by: suchi
Latest Answer: C is often called a middle-level computer language as it combines
the elements of high-level languag... Last Updated By Jithender Reddy on August (Answers: 14) Read / Answer
25, 2006
192. what is far pointer? Subscribe
Asked by: ash_k6
Latest Answer: When the function is present out side the segment, it requires base
(Answers: 7) Read / Answer
address and offsetaddress. To ... Last Updated By mahendra on April 11, 2006
193. THE QUESTIONS ARE AS FOLLOWS:1.WRITE A \'C\' PROGRAM TO READ THE AGE OF 100 PERSONS AND C Subscribe
THE QUESTIONS ARE AS FOLLOWS:1.WRITE A \'C\' PROGRAM TO READ THE AGE OF 100 PERSONS AND COUNT THE NUMBER OF
PERSONS IN THE AGE GROUP 50 TO 60.USE FOR LOOP AND CONTINUE STATEMENTS.(10 MARKS)2.WRITE A PROGRAM TO READ A
POSITIVE INTEGER AND PRINT ITS BINARY EQUIVALENT.(10 MARKS)3.GIVEN TWO ONE DIMENSIONAL ARRAYS A AND B WHICH ARE
SORTED IN ASSCENDING ORDER.WRITE A PROGRAM TO MERGE THEM INTO A SINGLE SORTED ARRAY ,C THAT CONTAINS EVERY
ITEM FROM ARRAYS A AND B,IN ASCENDING ORDER.(10 MAR
Asked by: Arka chakraborty
Read / Answer
194. how can i find size of a variable without using sizeof() operator? Subscribe
Asked by: viswanath
Latest Answer: What is the significance of using a char porinter in #define
any_size(any) (char*)(&any)-(char*)... Last Updated By reshma on September 16, (Answers: 6) Read / Answer
2006
195. output of the following programvoid main(){unsigned i;i=100*400;printf(\ Subscribe
Asked by: dilip
Latest Answer: tes sucheta you r absolutely righteven unsigned never takes -ve (Answers: 15) Read / Answer
values and it doubles the memory by ... Last Updated By santhoshkumar on
October 07, 2006
196. How to find entered number is EVEN or ODD without using conditional statement(not using if.. else,i Subscribe
How to find entered number is EVEN or ODD without using conditional statement(not using if.. else,if.. , else if..,while, do... while...., for....)
Asked by: kapilmandge
Read / Answer
197. What will be the output of the following program in UNIX OS with CC compiler and TC compiler?int ma Subscribe
What will be the output of the following program in UNIX OS with CC compiler and TC compiler?int main(){ int i=5; printf("\n%d",++i + ++i + ++i + ++i +
++i );} If any difference then Why it is difference?
Asked by: sachinp1979
Read / Answer
198. union u1{ int i; char c;}u2;u2.i=32767;u2.c='a';now the i value gets replaced.If we want Subscribe
union u1{ int i; char c;}u2;u2.i=32767;u2.c='a';now the i value gets replaced.If we want to know the data that is saved in the union..internally, without
knowing what values that we are using in the prog.that is if just want to know whether a union currently holds an int or a char? If it is a combination of
both int and char..we must know even that. and the memory locations at which this data is stored?
Asked by: lakshmi_pathuri
Read / Answer
199. when function say abc() calls another function say xyz(), what happens in stack? Subscribe
Asked by: gopi_ra
Latest Answer: when the function 'abc()' calls another function 'xyz()' then first of
(Answers: 5) Read / Answer
all, current status of execut... Last Updated By Sunil Soni on May 06, 2006
200. How to remove duplicate elements from an array Subscribe
Asked by: mitu218
Latest Answer: actually u can use binary search tree and remove duplicates in nlogn time ... Last Updated By asdf on July 31, 2006
201. what is o/p for the following?struct tr{int i=9;char a='l';};&struct ty{int i:6;char c:&# Subscribe
what is o/p for the following?struct tr{int i=9;char a='l';};&struct ty{int i:6;char c:'m';};
Asked by: sreelu
Read / Answer
202. main(int x).............explaination on arguments passed thr' main Subscribe
Asked by: manamohan
Latest Answer: I am afraid, nitil goel is also partially correct. The environment
(Answers: 3) Read / Answer
parameter is not a character poin... Last Updated By shibaji paul on April 20, 2006
203. How do you write a C program which can calculate lines of code but not counting comments? Subscribe
Asked by: lizz
Latest Answer: working code ************************#includemain(){ FILE *f; char
(Answers: 4) Read / Answer
ch;int c=0; ... Last Updated By gpreddy on November 08, 2006
204. how to swap the content oftwo variables without a temporary variable Subscribe
Asked by: udaykalai
Latest Answer: This won't work if any one of two nymbers is 0... Last Updated By
(Answers: 18) Read / Answer
gpreddy on November 08, 2006
205. what is the difference between the two expressions.int* a = 0;int* a = 10; Subscribe
Asked by: ykirankumarmca
Latest Answer: good... Last Updated By ajin on September 04, 2006 (Answers: 5) Read / Answer
206. How do i design an Algorithm to check if a number is an Armstrong number? Subscribe
Asked by: Moses Iisa
Latest Answer: in C#:public static bool isArmstrong(int intInteger){// Declarationsint
(Answers: 5) Read / Answer
Length, Total1, Temp;string ... Last Updated By JonBruse on November 14, 2006
207. Output of this Programme please??main(){ int a[]={2,4,6,8,10}; int i;change(a,5);for(int i=0;i Subscribe
Asked by: Rajit Keskar
Latest Answer: The error is in int i;for(int i=0;i... Last Updated By gpreddy on
(Answers: 8) Read / Answer
November 08, 2006
208. Can we use string in switch statement? Subscribe
Asked by: Monika Bhalla
Latest Answer: We cannot use a string in switch statem... Last Updated By
(Answers: 2) Read / Answer
Nadeem Yousuf on May 03, 2006
209. How can you calculate number of nodes in a circular Linked List? Subscribe
Asked by: Monika Bhalla
Latest Answer: how can u check for NULL...in circular list the next node will never
(Answers: 5) Read / Answer
be null... Last Updated By fairy on April 26, 2007
210. What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro? Subscribe
Asked by: anu
Latest Answer: #define NULL 0#define NULL_PTR (void *)0NULL_PTR has... Last Updated By Yada Kishore on June 19, 2006
211. Where are the auto variables stored? What is the use of register variables? Subscribe
Asked by: Renuka
Latest Answer: By saying register to a Variable , you are just suggesting the
compiler put in register.Compiler is ... Last Updated By shaanxxx on August 20, (Answers: 3) Read / Answer
2006
212. c program for delete a node from linked list Subscribe
Asked by: praveen.g
Latest Answer: struct node{int data;struct node * next;}list;for deleting a node from
(Answers: 1) Read / Answer
list first we have read a ele... Last Updated By venkatesh on May 19, 2006
213. What is the differece between #define and constant in C? Subscribe
Asked by: byadwad
Latest Answer: Scope of both #define and constant will be differ. #define...
(Answers: 10) Read / Answer
Last Updated By suresh on August 31, 2006
214. How can we open a image file through C program Subscribe
Asked by: kalaiselvan.s
Latest Answer: The BMP file normally has it's header format. To read the header
format we need to create a structre... Last Updated By Paul Thilak on August 09, (Answers: 3) Read / Answer
2006
215. write a program which sends a token on network and give the list of IP addresses of all the client Subscribe
write a program which sends a token on network and give the list of IP addresses of all the client currently active ?(program is running on server)
Asked by: umesh
Read / Answer
216. in c , main() is a function . and where is defined main() in c. bcz every function has three part Subscribe
in c , main() is a function . and where is defined main() in c. bcz every function has three parts. 1>. decleration 2>. definition. 3>. calling
Asked by: raj bardhan
Read / Answer
217. what is wrong with the following c prog??char *s1 = "hello";char *s2 = "world"; Subscribe
what is wrong with the following c prog??char *s1 = "hello";char *s2 = "world";char *s3 = strcat(s1, s2);Please provide me explainations??
Asked by: Poonam
Read / Answer
218. Between a long pointer and a char pointer , which one consumes more memory? explain Subscribe
Asked by: Raji
Latest Answer: I think pointers take 4 bytes in a 4GB virtual memory space, which
(Answers: 7) Read / Answer
is true for most of the OS in now... Last Updated By Hinstings on August 20, 2006
219. what does it mean-a[i]=i+i Subscribe
Asked by: prashant143
Latest Answer: It is a simple assignment operation on arraysIn this the current
array variable is assigned double t... Last Updated By sachintewari on July 13, (Answers: 4) Read / Answer
2006
220. How to break cycle in circular single link list? Subscribe
Asked by: brijesh kumar gautam
Latest Answer: There's an algorithm called Floyd-cycle finding algorithm.Briefly, start from a node and travers... Last Updated By alley on July 02, 2007
221. how to improve my c knowledge........ Subscribe
Asked by: hitesh r keshwala
Latest Answer: C HELP ALSO HAS MANY PROGRAM. IT SHOWS
COMMAND ,SYNTAX EXAMPLE AND ALSO THE COMPATIBILITY WITH... Last (Answers: 4) Read / Answer
Updated By UMESH RAM on September 07, 2006
222. How do you write a program which produces its own source code as its output? Subscribe
Asked by: svsuresh
Latest Answer: open the selfcopy.c file inside its code---selfcopy.c---#include
(Answers: 1) Read / Answer
#include#include main() { F... Last Updated By sambit otta on July 07, 2006
223. What is a null macro? What is the differtents between a null pointer and a null macro? What is n Subscribe
What is a null macro? What is the differtents between a null pointer and a null macro? What is near, far and huge pointer? How many bytes are
occupied by them? How would you obtain segment and offset addresses from a far address of a memory location?
Asked by: ShanthiSenthilKumar
Read / Answer
224. How to write a C program to find the power of 2 in a normal way and in single step? Subscribe
Asked by: anjali
Latest Answer: My mistake, actually, what I want to say is "if the given number is
(Answers: 7) Read / Answer
like 2^(-2)"? Can we check that.... Last Updated By Hinstings on August 20, 2006
225. I want C program code for : Reverse the links of a linked list by traversing only once Input:The in Subscribe
I want C program code for : Reverse the links of a linked list by traversing only once Input:The input consists of the information in each node of the
linked list. Output:The program displays the information in the linked list after the links are reversed. Sample Input:Enter the information in the linked
list (Enter -1 to exit): 1020304050-1Sample Output:After the links are reversedInformation in the linked list:5040302010
Asked by: souji1425
Read / Answer
226. I want a C program to rearrange a linked list so that nodes with even numbers as their information Subscribe
I want a C program to rearrange a linked list so that nodes with even numbers as their information come first. Input:The input consists of the
information in each node of the linked list. Output:The program displays the information in the linked list after the links are rearranged. Sample
Input:Enter the information in the linked list (Enter -1 to exit): 321020478-1Sample Output:After links are rearrangedInformation in the linked
list:21020483
Asked by: souji1425
Read / Answer
227. I want a C program for : If the list of students’ information is represented by a linked lis Subscribe
I want a C program for : If the list of students’ information is represented by a linked list, write a program which implements deletion of the node with
given student ID. The student information which will be captured is Student ID and Student Name. Input:Input consists of list of students with their IDs
and their names and the ID of the student whose information should be deleted from the linked list.Output:The information of all the students after the
student with given ID is removed.
Asked by: souji1425
Read / Answer
228. Write a program which accepts a filename as a command line argument and coverts all characters in t Subscribe
Write a program which accepts a filename as a command line argument and coverts all characters in the file to uppercase.
Asked by: souji1425
Read / Answer
229. write a program which accepts a filename as a command line argument and reverses the contents of th Subscribe
write a program which accepts a filename as a command line argument and reverses the contents of the file( ie first character becomes the last
character of the file and so on) Input: The program takes the file name whose content should be reversed. Output: The program reverses the contents
of the file.
Asked by: souji1425
Read / Answer
230. How to type a string without using printf function? Subscribe
Asked by: mohamed arafath
Latest Answer: use write system call write (1 , "XXXXXXXXXXXXXXX" , strlen("XXXXXXXXXXXXXXX" ));... Last Updated By shaanxxx on August 20, 2006
231. How to Write a recursive function to compute the number of sequences of n binary digits that do not Subscribe
How to Write a recursive function to compute the number of sequences of n binary digits that do not contain two 1s in a row. Write a main function to
test this function. Input:Input consists of the number of binary digits in the sequence.Output:Output consists of the number of sequences of given
binary digits that do not contain two 1s in a rowSample Input:Enter the number of binary digits in the sequence:5Sample Output:Number of sequences
of 5 binary digits that do not contain two 1s in a row
Asked by: souji1425
Read / Answer
232. whats is structure padding?Say a given structureStruct{int a;char c;float d;}the size of structure Subscribe
whats is structure padding?Say a given structureStruct{int a;char c;float d;}the size of structure is 7 here.But structure padding is done what will be the
size of the struct?Will it change and how?How to avoid this?is it necessary?
Asked by: geeta
Read / Answer
233. If we develop a project in C, then how can we create an exe file of it? Subscribe
Asked by: Rajesh
Latest Answer: Assume Your Project Contains 3 different files + 1 main file
containing main() functionRequired Step... Last Updated By vignesh007 on August (Answers: 2) Read / Answer
05, 2006
234. how to find a given number is armstrong number or not in "c".? Subscribe
Asked by: sudheer kumar
Latest Answer: The check should should be while ( n>=1) and not (n>=0)The
cotrol enters into an infinite whil... Last Updated By Deepak kumar Prasad on (Answers: 4) Read / Answer
August 07, 2006
235. Why do we need to test weather it is memory leak or not?How are we going to know that? Subscribe
Asked by: RAJU
Latest Answer: 1) Use Purify 2) Write your own memory allocator, which will report
(Answers: 3) Read / Answer
... Last Updated By shaanxxx on August 19, 2006
236. How do we get Square root of any number Without using sqrt() fuction? Subscribe
Asked by: rohan chapke
Latest Answer: #include main(){int a=5;int b=a^(.5)tf("%d", b);}... Last Updated By
(Answers: 4) Read / Answer
R.S.Jayasathyanarayanan on December 17, 2006
237. how do display the list in single linked list form last to first Subscribe
Asked by: suresh
Latest Answer: excellent answer... Last Updated By mritunjay on September 25,
(Answers: 4) Read / Answer
2006
238. fibbonaci series program Subscribe
Asked by: devaraj
Latest Answer: A simple and logical solution to this problem is as follows :-int
(Answers: 5) Read / Answer
fib(int pos){return (pos > 2)? fib... Last Updated By Deepak on January 24, 2007
239. struct Foo{char *pName;};main(){struct Foo *obj = malloc(sizeof(struct Foo));clrscr();strcpy(obj->p Subscribe
struct Foo{char *pName;};main(){struct Foo *obj = malloc(sizeof(struct Foo));clrscr();strcpy(obj->pName,"Your Name");printf("%s", obj->pName);} a.
Your Name b. compile error c. Name d. Runtime error///////////////////struct Foo{char *pName;char *pAddress;};main(){struct Foo *obj =
malloc(sizeof(struct Foo));clrscr();obj->pName = malloc(100);obj->pAddress = malloc(100);strcpy(obj->pName,"Your Name");strcpy(obj->pAddress,
"Your Address");free(obj);print
Asked by: hardeep85
Read / Answer
240. what are returned by printf(), scanf() functions,if they return anything means what are that? Subscribe
Asked by: mainathan
Latest Answer: In general, the return type for both printf nd scanf is integer....scanf returns no ... Last Updated By Venky on March 03, 2007
241. Let's say you want to develop a matrix manipulation library in pure C (not C++). For example, Subscribe
Let's say you want to develop a matrix manipulation library in pure C (not C++). For example, you want to define a "matrix_multiply" function to get A *
B, how to declare the function and how to implement it? Make sure that you consider error handling stuff, e.g., a 2*2 matrix and a 3*3 matrix cannot
multiply, and how to detect and deal with the situation when you pass a 3*3 matrix as a parameter which should actually be 2*2.
Asked by: Hinstings
Read / Answer
242. FILE *fp;What is size of FILE data type??? Subscribe
Asked by: vignesh007
Latest Answer: FILE *fp;printf("%d...%d...
%d",sizeof(FILE),sizeof(fp),sizeof(*fp));Output: (In Turbo C)16... Last Updated By (Answers: 4) Read / Answer
Guna S on July 12, 2007
243. make a program that will read a string and after that it determine the total of the letters, total Subscribe
make a program that will read a string and after that it determine the total of the letters, total of spaces,total digits,and total characters. example: i
enter a string, hi 123 and the output is like this:TOTAL LETTERS:2TOTAL SPACES:2TOTAL DIGITS:3TOTAL CHARACTERS:7 pls. help me i need
the answer a.s.a.p. thank you.
Asked by: gilbert
Read / Answer
244. In OOPS do curent memory locators provide enough speed or flexibility? Subscribe
Asked by: sriram
Read / Answer
245. How will you multiply two numbers using BITWISE operators ? Subscribe
Asked by: jagdeessh
Latest Answer: Following code snippet would do the required
action:#includemain(){ int a... Last Updated By vvsureshreddy on August 29, (Answers: 1) Read / Answer
2006
246. what is the use of volataile variable ? when we need to delcare a varaible as volataile ? Subscribe
Asked by: Mahesh
Latest Answer: using volatile option doesnt put the variable in cache so there is will
(Answers: 4) Read / Answer
no time delay in updation of... Last Updated By tej on September 04, 2006
247. what would be the output of the following program ?main (){printf ("welcome to the world" Subscribe
what would be the output of the following program ?main (){printf ("welcome to the world");fork();}how many times "welcome to the world" message
will print ?
Asked by: chandoluMahesh
Read / Answer
248. Explain the pointer concept in c? Subscribe
Asked by: Mohamed mansoordeen
Latest Answer: Hi,Pointers are variables which store address of an varaiable.int
a=2;int *ptr;ptr=&a;let "2002" be ... Last Updated By subbu malepati on September (Answers: 2) Read / Answer
13, 2006
249. Consider the following program segment :#include #include void main () { char buf[100] = " Subscribe
Consider the following program segment :#include #include void main () { char buf[100] = "hello"; strcat(buf,buf); printf(buf);}While executing this in
VC++ I do not get an output . Looks like the program runs into an infinite loop. But while executing the same in Turbo C I get the output as
"hellohelloh". What could be the reason behind this difference in output?
Asked by: dhana80s
Read / Answer
250. There are no's between 1 to 2000 in a file line by line.print the no's in sorted order i Subscribe
There are no's between 1 to 2000 in a file line by line.print the no's in sorted order in o(n) complexity
Asked by: Mythily
251. 1)what is RTTI in c++?2)main(){ int i=10; int &p=i; //statement 2printf("%d %d"i,p);} Subscribe
1)what is RTTI in c++?2)main(){ int i=10; int &p=i; //statement 2printf("%d %d"i,p);}plz simplify the statement the 2 .when i run program gives
undefined symbol p..but in a/c mcq that is correct ..say collect address of i ..how??
Asked by: anuj
Read / Answer
252. why do we use header file Subscribe
Asked by: tanuja
Latest Answer: Hi, To include the functions which are not changed and which are
(Answers: 1) Read / Answer
useful for other functi... Last Updated By uddin2000 on September 13, 2006
253. what are way to use while loop Subscribe
Asked by: ankit jain
Latest Answer: 'while' loop can be used in two waysEntry controlled loop
like:while(condition){ ...... ..... ... Last Updated By M. PAVAN KUMAR REDDY on (Answers: 2) Read / Answer
January 30, 2007
254. Why C doesnt support function overloading Subscribe
Asked by: pushkarraj2
Latest Answer: overloading is polymorphism which is one of the characteristics of
(Answers: 3) Read / Answer
Object oriented programming. C i... Last Updated By jose on October 19, 2006
255. When multiple process will be using a shared memory to restict the ambiguity we use semaphore techn Subscribe
When multiple process will be using a shared memory to restict the ambiguity we use semaphore technique. Can I achieve the same thing using a file
in place of semaphore , if yes how? If no why?
Asked by: shruti
Read / Answer
256. how will you overload subscript operator with more than one dimension? Subscribe
Asked by: muralib
Read / Answer
257. how to make a progarm using switch case statement? Subscribe
Asked by: gilbert
Latest Answer: Brankets "{}" are not necessary in case branches, since switch- (Answers: 4) Read / Answer
case is straight flow struc... Last Updated By Riquelme on March 12, 2007
258. Hi,Pls tell me the importance of volatile in the below program and what is returned by the program. Subscribe
Hi,Pls tell me the importance of volatile in the below program and what is returned by the program. this program finds the square of a number. where
are volatile variables exactly used in C programming ?int sqr(volatile int *ptr){ return (*ptr**ptr);}
Asked by: Divya415
Read / Answer
259. how to reverse a string using array? Subscribe
Asked by: vineet
Latest Answer: #include#include#includevoid main(){ char name[25],rev[25]; int i,l;
printf("enter the name"); ge... Last Updated By R.S.Jayasathyanarayanan on (Answers: 4) Read / Answer
December 16, 2006
260. HOW TO PRINT "n" in C? Subscribe
Asked by: chalam
Latest Answer: void main(){ printf(""""n"""");}orvoid main(){&n... Last Updated By rekha123456 on April 23, 2007
261. What is the practical implementation of Linked List ? Subscribe
Asked by: tops18
Latest Answer: Linked lists are useful data structures, especiallY if You need to
automaticallY allocate and de-all... Last Updated By umeshknair on September (Answers: 2) Read / Answer
14, 2006
262. How to swap low-order byte & the high order byte in an integer without using temporary variable?for Subscribe
How to swap low-order byte & the high order byte in an integer without using temporary variable?for ex: int a=20;It is represented in bits as (i.e 16 bit
format)since integer is of two bytes00000000 00010100i want the answer as00010100 00000000ie 5120 as the answer
Asked by: preetham
Read / Answer
263. Printing numbers from 1 to 100 without using condition checking. Subscribe
Asked by: muhammad nayeemuddin
Latest Answer: Just came up with another solution. It is a 1-liner:cout ... Last
(Answers: 9) Read / Answer
Updated By jose on October 19, 2006
264. how do print two line without using of two printf lines,n. Subscribe
Asked by: anand
Latest Answer: The new line character is n.printf("%s" n "%s","hai","welcome");...
(Answers: 5) Read / Answer
Last Updated By chris on November 15, 2006
265. The two declarations are different Can you explain where these declarations are applicable effectiv Subscribe
The two declarations are different Can you explain where these declarations are applicable effectivelyconst char *s; char const *s;
Asked by: Mamadur Nagaraj
Read / Answer
266. Write a program to delete itself after execution? Subscribe
Asked by: Annapurna
Latest Answer: include include int main(int cnt, char **vec){ remove(vec[0]); ... Last
(Answers: 1) Read / Answer
Updated By umeshknair on September 21, 2006
267. write a program that will print out all the possible combinations of the charecters present in the Subscribe
write a program that will print out all the possible combinations of the charecters present in the given string.for example:monu,numo,nmou etc.
Asked by: chanchal
Read / Answer
268. How to convert string to hexadecimal value?(using user-defined functions) Subscribe
Asked by: surendra
Latest Answer: bool StrtoHex(const char* str){//If string is emptyif(str ==
NULL)return false;//Variable to indicat... Last Updated By Swati on January 09, (Answers: 2) Read / Answer
2007
269. 1.how to connect database in c and c++2.what is CGI? 3.c and c+++ how to act in CGI? Subscribe
Asked by: karthick
Latest Answer: Hi BinnyPlease find the two files test.c and Makefile file for make a
(Answers: 3) Read / Answer
connection with test data... Last Updated By abhati_voip on January 05, 2007
270. Write a program to get the following output ..n should be entered by user...like when n=5 the outpu Subscribe
Write a program to get the following output ..n should be entered by user...like when n=5 the output should be110101101010101
Asked by: Bhavana

271. write a program to convert numbers into words?for ex: 547Five Hundred and Forty Seven Subscribe
Asked by: Preetham
Latest Answer: Gud idea!!! But how will "1003" Work???... Last Updated By
(Answers: 2) Read / Answer
Sundar A on November 30, 2006
272. Write a program to print nos between 100 and 500 which should print nos having 3 different digitsfo Subscribe
Write a program to print nos between 100 and 500 which should print nos having 3 different digitsfor eg:it should print :123,159,342 etc all have
different digits...but not 121, 122,333, see here atleast 2 digits are equal
Asked by: Bhavana
Read / Answer
273. How to reverse a single link list. Thanks Subscribe
Asked by: gudia
Latest Answer: A simple recursive function should do the trickAssuming "node" (Answers: 17) Read / Answer
being typedef-ed to your link structu... Last Updated By Sundar A on November
30, 2006
274. what is Spool Templates, how it is Counted? Subscribe
Asked by: Amjith PS
Read / Answer
275. How we print alphabets using while loop? Subscribe
Asked by: geetasanikop
Latest Answer: no the last one works absolutely right .... ... Last Updated By Vivek
(Answers: 7) Read / Answer
on January 04, 2007
276. What is Static function in C?and what is the use of it Subscribe
Asked by: hema
Latest Answer: The question is already posted on the list..... A lot of answers are
(Answers: 1) Read / Answer
also available.... u should see... Last Updated By vipin gupta on October 20, 2006
277. why c does not have nested functions Subscribe
Asked by: someshwar_goli
Latest Answer: no,c does not have the nested functionit consist of only one
function that is mainwe can declar... Last Updated By garima jain on January 10, (Answers: 2) Read / Answer
2007
278. how to store some value at any desired address? Subscribe
Asked by: sayanta
Latest Answer: Hi , I think whenever you wanna write some data in a... Last
(Answers: 3) Read / Answer
Updated By Vivek Bhadra on January 04, 2007
279. there is an array having duplicates i,e any number can be repeated any no of times .write a program Subscribe
there is an array having duplicates i,e any number can be repeated any no of times .write a programme to print for each no how many times it is
repeated.EX:1,1,1,1,1,2,3,2,3,11 is repeated 6 times2 is repeated 2 times3 is repeated 2 times
Asked by: kalyani
Read / Answer
280. How can you find the number of elements stored in a static array at a time? Subscribe
Asked by: Bharat Chandra Biswal, Bhubaneswar
Latest Answer: actually your answer is for array which contain integer only .......give general form... Last Updated By sweety on December 24, 2006
281. main(){int x=20;int y=35;x=y++ +x++;printf("%d",x);} Subscribe
Asked by: reddappareddy
Latest Answer: here, x = 20; & y = 35; given, x= y++ + x++; so in this case, first we
(Answers: 12) Read / Answer
put the ... Last Updated By prashant kara on January 24, 2007
282. What are the differences between Arrays and Linked lists and why we go for linked lists if we have Subscribe
What are the differences between Arrays and Linked lists and why we go for linked lists if we have pointers to arrays?
Asked by: Narsimha Rao T
Read / Answer
283. what are commandline arguements. Plz explain me in detail Subscribe
Asked by: Raghavendra
Latest Answer: command line aruments are nothing but passing the function
arguments through command line. ex: ... Last Updated By T.Raghavendra on (Answers: 1) Read / Answer
November 24, 2006
284. can we write a c prog without #include? Subscribe
Asked by: prashant j
Latest Answer: you need not write #include, but at the time of compilation you
need to compile with options which d... Last Updated By navin_chand on March (Answers: 12) Read / Answer
25, 2007
285. How, multidimensional array initilized dynaminically? Subscribe
Asked by: Pankaj
Latest Answer: a) int **array1 = (int **)malloc(nrows * sizeof(int *)); for(i = 0; i <
(Answers: 5) Read / Answer
nrows; i++) array1[i] = mal... Last Updated By dasam on April 02, 2007
286. Find the output for the following C programmain(){char *ptr = "Ramco Systems";*ptr++;prin Subscribe
Find the output for the following C programmain(){char *ptr = "Ramco Systems";*ptr++;printf("%sn",ptr);ptr++;printf("%sn",ptr);}explain difference
between *ptr++ and ptr++
Asked by: johnhu
Read / Answer
287. Why does a character constant require two bytes of memory space in C programming Subscribe
Asked by: bharat biswal
Latest Answer: This is wrong one ..please try this code as-int main(){printf("size of
(Answers: 3) Read / Answer
char const %dn",siz... Last Updated By mprashant on February 19, 2007
288. There are numbers from 1 to N in an array. out of these, one of the number gets duplicated and one Subscribe
There are numbers from 1 to N in an array. out of these, one of the number gets duplicated and one is missing. The task is to write a program to find
out the duplicate number. Conditions: you have to do it in O(n) time without using any auxilary space (array, bitsets, maps etc..).
Asked by: vipin gupta
Read / Answer
289. char *f(void){ char *a; a=malloc(sizeof(char)*10); strcpy(a,"hello World"); return a; }in Subscribe
char *f(void){ char *a; a=malloc(sizeof(char)*10); strcpy(a,"hello World"); return a; }int main(){ char *b; b = f(); printf("%s",b); }Is there any error in this
code?
Asked by: Rubel
Read / Answer
290. What is the size of int in C or C++?Answer:1) 2 byte2) system dependend3) compiler dependend Subscribe
Asked by: BHISMADEB
Latest Answer: The answer is 2 i.e it is system dependent ....... Last Updated By AnupDas on February 04, 2007
291. why an array initialisation is not possible in the main()ex:---------char arry[6][6];main(){c={&qu Subscribe
why an array initialisation is not possible in the main()ex:---------char arry[6][6];main(){c={"rotor","motor",peter","mater","water"};}
Asked by: j_priyaa
Read / Answer
292. Write a C program to find biggest of 4 numbers without using relational operators? Subscribe
Asked by: Arun Reddy.Nare
Latest Answer: n1,n2,n3,n4if(n1-n2) && (n1-n3) && (n1-n4)... Last Updated By
(Answers: 6) Read / Answer
Praveen K on January 19, 2007
293. Why does indexes start with zero? Subscribe
Asked by: barathi
Latest Answer: In order to access an element in an array, we will use index.Let us
declare:int a[20];Here a is the ... Last Updated By M. PAVAN KUMAR REDDY on (Answers: 1) Read / Answer
January 18, 2007
294. what is the difference between auto and register storage class? when we use it in real time? Subscribe
Asked by: bajjuri.thirupathi
Latest Answer: Apart from the above mentioned ones, the maximum number that
could be stored in registers depends so... Last Updated By div_han on March 13, (Answers: 2) Read / Answer
2007
295. what will be the ouput of the following program.,if any error what is it.#includevoid main(){float Subscribe
what will be the ouput of the following program.,if any error what is it.#includevoid main(){float x=90.5,y=5.0,z;z=x%y;printf("%f",z);}
Asked by: pavankishore
Read / Answer
296. Why cannot we pass or return any parameters from the Interrupts, please give me an answer taking as Subscribe
Why cannot we pass or return any parameters from the Interrupts, please give me an answer taking as a interrupts in the micro controllers.
Asked by: Satish
Read / Answer
297. How we increment a value without using operator'+'.q2?what is single tone class. Subscribe
How we increment a value without using operator'+'.q2?what is single tone class. thanks
Asked by: gudia
Read / Answer
298. what is conditional compiling? Subscribe
Asked by: dinesh
Latest Answer: Conditional Compilation:::::Conditional compilation is the process
of selecting which code to compil... Last Updated By fcawad_03 on February 18, (Answers: 2) Read / Answer
2007
299. How does strcmpi() compare two string as it is not a case sensitive? Subscribe
Asked by: malaram
Latest Answer: Either convert both the strings to lower case / upper case before
(Answers: 1) Read / Answer
comparing... Last Updated By Raghunath on January 30, 2007
300. Write a program to get strings and to substitute character from string1 to string2(equv to UNIX com Subscribe
Write a program to get strings and to substitute character from string1 to string2(equv to UNIX command tr)for example:string1: "abc"string2: "def"the
occurrence of 'a' will be replaced by 'd' , 'b' will be replaced by 'e' , 'c' will be replaced by 'f'AND for less complexity assume the string1 and string2 are
of same size
Asked by: rafiuddin
301. What is the difference between character array and string in C? Subscribe
Asked by: ravi.dokania
Latest Answer: I think there is nothing difference b/w both because string is a
collection of character or we can s... Last Updated By malaram on February 06, (Answers: 1) Read / Answer
2007
302. What is the output of the following program?void main(){int *ptr =55;clrscr();printf("%d" Subscribe
What is the output of the following program?void main(){int *ptr =55;clrscr();printf("%d", ++(ptr));}
Asked by: Seetham
Read / Answer
303. Q1 Given an array of characters. How would you reverse it. ? How would you reverse it withou Subscribe
Q1 Given an array of characters. How would you reverse it. ? How would you reverse it without using indexing in the array ?Q2 How can I call a
function, given its name as a string? Q3 How can I invoke another program from within a C program? Q4 How can I access memory located at a
certain address? Q5 How can I allocate arrays or structures bigger than 64K? Q6 How can I find out how much memory is available? Q7 How can I
read a directory in a C program? Q8 How can I increase the allowable
Asked by: rameshwar83
Read / Answer
304. 1.write a function swap(a,b) which interchanges 2 integers .call the function from the sort() funt Subscribe
1.write a function swap(a,b) which interchanges 2 integers .call the function from the sort() funt whenever two integers have to be interchanged.2.
write a c program to add the diagonal elements of an 3x3 array.3.write a function called max(a,b,c) that finds the bigger of 2 nos a and b and stores it
in the address of the int variable passed as the third argument.
Asked by: brian
Read / Answer
305. what is structure padding?where it is used in real time applications? Subscribe
Asked by: praneeth
Latest Answer: I understand that some compilers pad some bytes to the aggregate
data types in order to access the m... Last Updated By fcawad_03 on February 21, (Answers: 2) Read / Answer
2007
306. Waht is the sample code to print pascals traingle in c Subscribe
Asked by: lokesh
Latest Answer: The code mentioned here is not exactly of pascal triangle but it
(Answers: 1) Read / Answer
gives the output in the following f... Last Updated By baseersd on June 20, 2007
307. what is the difference between these two syntax#include and #include "stdio.h" Subscribe
Asked by: ankur sharma
Latest Answer: #include"stdio.h" will only compile standard input output function...
(Answers: 3) Read / Answer
Last Updated By jatin bhatia on March 26, 2007
308. the fields in a structure of a c program are by default 1. protected 2. public 3. private Subscribe
the fields in a structure of a c program are by default 1. protected 2. public 3. private 4. can't say
Asked by: Rujul
Read / Answer
309. cfront 1. is front end of a c compiler 2. is the pre-processor of a c compiler 3. translat Subscribe
cfront 1. is front end of a c compiler 2. is the pre-processor of a c compiler 3. translates a c ++ code to its equivalent 4. is both pre-processor and front
end
Asked by: Rujul
Read / Answer
310. printf ("%d" ,printf {"tim") ); 1. results in a syntax error 2. outpu Subscribe
printf ("%d" ,printf {"tim") ); 1. results in a syntax error 2. outputs tim 3 3. outputs garbage 4. prints tim and terminates abruptly
Asked by: Rujul

311. the header files used in C programs are usually found in 1. /bin/include 2. /usr/bi Subscribe
the header files used in C programs are usually found in 1. /bin/include 2. /usr/bin/include 3. /dev/include 4. /usr/ include
Asked by: Rujul
Read / Answer
312. the value of an automatic variable that is declared but not initialized will be 1. 0 Subscribe
the value of an automatic variable that is declared but not initialized will be 1. 0 2. -1 3. unpredictable 4. 3
Asked by: Rujul
Read / Answer
313. break statement can be simulated by using 1. go to 2. return 3. exit 4. bot Subscribe
break statement can be simulated by using 1. go to 2. return 3. exit 4. both return and exit
Asked by: Rujul
Read / Answer
314. Lint is 1. a C compiler 2. an inter-active debugger 3. a C interpreter 4. a to Subscribe
Lint is 1. a C compiler 2. an inter-active debugger 3. a C interpreter 4. a tool for analyzing a C program
Asked by: Rujul
Read / Answer
315. the following program fragment int m=n=b=8; char wer[80]; sprintf(wer, " Subscribe
the following program fragment int m=n=b=8; char wer[80]; sprintf(wer, "%d%d%d", m, n, b,); puts (wer): 1. prints the string 8 8 8 2. prints the null
string 3. prints the string m, n, b 4. none of these
Asked by: Rujul
Read / Answer
316. Consider thefollowing code for finding the factorial of given positive integer IFACT=1 Subscribe
Consider thefollowing code for finding the factorial of given positive integer IFACT=1 DO 100 I=2,N,2 100 IFACT = IFACT*i*(i-1) For which value of N,
the above FORTRAN code will not work ? 1. N is even 2. N is odd 3. N is perfect number 4. N mod 3 =0
Asked by: Rujul
Read / Answer
317. Integral data type Subscribe
which one of the following is not an integral data type 1. Character 2. Boolean 3. Integer 4. Pointer type Asked by: Rujul
Latest Answer: Pointer Type is not an integral.Even though pointer type hold
integer type value, It doesn't mea... Last Updated By shivakumara.madegowda on (Answers: 1) Read / Answer
March 20, 2007
318. Consider the following program:#includemain(){int i=3;int *j;int **k;j=&i;k=&j;printf("Address Subscribe
Consider the following program:#includemain(){int i=3;int *j;int **k;j=&i;k=&j;printf("Address of i=%un",&i);printf("Address of j=%un",&j);printf("Address
of k=%un",&k);return 0;}Suppose the answer is:Address of i=2004Address of j=2002Address of k=2000why is the address decreasing ?
Asked by: L.Ranjani
Read / Answer
319. what is the difference between global int & static int declaration Subscribe
Asked by: suresh
Latest Answer: Static int variable are accessed only inside the file where it
(Answers: 1) Read / Answer
is defined. Thus we ca... Last Updated By RaviPrakash on March 30, 2007
320. what is meant by "contagious memory allocation"? Subscribe
Asked by: ragav_sathish
Latest Answer: Contiguous memory is meant by continuous memory space in the available memory. so when we allocate a... Last Updated By bairaviuthra on
June 19, 2007
321. How size of structure can be calculated? What is byte alignment used while allocating memory for st Subscribe
How size of structure can be calculated? What is byte alignment used while allocating memory for structure members.
Asked by: svyengalwar
Read / Answer
322. What is heap memory that is used to store global & static variables of C. Subscribe
Asked by: svyengalwar
Read / Answer
323. If we pass null pointer in malloc or calloc function, What will be the result? Subscribe
Asked by: parvesh devi
Latest Answer: calloc(NULL, 2) = malloc(2).calloc(NULL,0) = malloc(0).... Last
(Answers: 1) Read / Answer
Updated By Lohith Nayak on June 08, 2007
324. What does it mean by "Host Connectivity application"? Subscribe
Asked by: santosh
Read / Answer
325. what are the arithmetic operations that can be performed on pointers? Subscribe
Asked by: navya nr punarva
Latest Answer: The arithmetic operations that can be performed using pointers is
(Answers: 1) Read / Answer
of three.... one is for addition, ... Last Updated By thulasi on April 30, 2007
326. What is difference between main() and void main()? Subscribe
Asked by: M.SREEDHAR REDDY
Latest Answer: program contain statement main it consider as int main .should
return a value. void means null... Last Updated By mohanapriyaaeee on June 24, (Answers: 2) Read / Answer
2007
327. What is the difference between a string constant and a constant string? Subscribe
Asked by: ykbharat
Latest Answer: A string constant consists of a sequence of characters enclosed
(Answers: 1) Read / Answer
indouble-quote marks. For example:... Last Updated By YRP on May 07, 2007
328. Which area of RAM does static variables get stored? Subscribe
Asked by: Riya
Latest Answer: Static is stored in the RAM -TPA areaThe TPA is subdivided to
code segment and data segment.Static v... Last Updated By muthu on June 20, (Answers: 3) Read / Answer
2007
329. What does e stand for in getche() function in C language. Subscribe
Asked by: kumar_sarma2000
Latest Answer: Hi , in getche() e stands for "echo" When the function is
(Answers: 1) Read / Answer
encountered, user has to type in... Last Updated By Shilpa on May 19, 2007
330. how to find the size of an integer without using the sizeof operator Subscribe
Asked by: sohita maheshwari
Latest Answer: #define SIZEOF(X) ( (char *) (X+1) - (char *) (X) )main(){int
(Answers: 1) Read / Answer
*x;double *y;printf("The Size of ... Last Updated By praveenp16 on May 20, 2007
331. main(){ int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j Subscribe
Asked by: souji1425
Latest Answer: Answer:2 2 2 2 2 2 3 4 5*c points at c[0] and this pointer never
(Answers: 1) Read / Answer
moves in the first loopIn the secon... Last Updated By guest on June 12, 2007
332. What would be the output of this program & Why#include#define one two#define two oneint main(){ in Subscribe
What would be the output of this program & Why#include#define one two#define two oneint main(){ int one=1,two=2; printf("%d%d",one,two); return
0;}
Asked by: himanshujoshi
Read / Answer
333. Difference between program memory, data memory, stack memory and heap memory? Subscribe
Asked by: senthil
Latest Answer: When the program is compiled and linked different parts of the
program is organised in seperate segm... Last Updated By Sridhar V on July 09, (Answers: 2) Read / Answer
2007
334. What is the preprocesser and why it need?What are the types in preprocessor? Subscribe
Asked by: saran
Read / Answer
335. To take a string from the User & then arrange the characters in that string in ascending order like Subscribe
To take a string from the User & then arrange the characters in that string in ascending order like if user enters "babcac" the program should print it as
"aabbcc"
Asked by: nadeem
Read / Answer
336. What is the advantage of zero filling in calloc() ? Subscribe
Asked by: viswanath
Read / Answer
337. How does inheritance in C works? Subscribe
Asked by: viswanath
Latest Answer: By using multiple structures means structure within a structure,
(Answers: 1) Read / Answer
we can achive inheritance in C.... Last Updated By rakio on July 09, 2007
338. What is the application of itoa() Subscribe
Asked by: rajesh
Latest Answer: Converts an integer value to a null-terminated string using the
specified base.If base is 10 and va... Last Updated By shine_babu on July 16, (Answers: 2) Read / Answer
2007
339. For what purpose pragma.h header file is used? Subscribe
Asked by: vanidevi
Read / Answer
340. Why does an array index number starts from zero? Subscribe
Asked by: Gautam Bhalla
Latest Answer: Because array index shows distance from the 1st element. Since the first element is zero distance aw... Last Updated By Nikhil on July 23,
2007
341. What is volatile qualifier? Subscribe
Asked by: suresh
Read / Answer
342. What is a qualifier? Subscribe
Asked by: rajeswari
Read / Answer
343. What is run time? Is there any difference between run time and compile time? Subscribe
Asked by: kanna
Latest Answer: Compile is a process that converts your source code into object
(Answers: 1) Read / Answer
code.(creation of .exe file)Run time... Last Updated By basheer on July 28, 2007
344. Can you write and get output for C program without using printf and scanf statements? If Yes, How? Subscribe
Asked by: sampathk
Latest Answer: You can also use functions like fprintf(),fputs(),gets(),fgets() instead
(Answers: 2) Read / Answer
of printf() and scanf(... Last Updated By baseersd on July 26, 2007
345. What is the return type of the printf and scanf functions ?1) void2) float3) int4) any Subscribe
int Asked by: ashish1287
Latest Answer: Hi Ashish,The return type of printf() and scanf() is intIn the
declaration, observe the return type ... Last Updated By baseersd on July 27, (Answers: 1) Read / Answer
2007
346. Can we define an array without any constant expression? If Yes, How? Subscribe
Asked by: ajay
Read / Answer
347. Write any small program that will compile in "C" but not in "C++" Subscribe
Asked by: gaurav pathak
Latest Answer: The following program compiles with 'C' with a warning about return type of main. But it wouldn't co... Last Updated By vipin gupta on July 28,
2007

Das könnte Ihnen auch gefallen