GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  Flextronics
Next Question 
 Flextronics  |  Question 1 of 3    Print  
1 What is reference pointer?
2 Which C features are not in C++?
3 Write a program of spiral matrix.
4 Write a program of magic square.

  
Total Answers and Comments: 2 Last Update: July 30, 2006     Asked by: Fakhruddin 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 15, 2006 12:25:48   #1  
Dev        

RE: 1 What is reference pointer?2 Which C featur...

Answers :

1.

A reference pointer is the less complex form of pointer. The most common use for this class of pointer is as a passing mechanism; for example, passing an integer by reference. Reference pointers have significantly better performance than full pointers, but are restrictive; you cannot create a linked list using a reference pointer because a reference pointer cannot have a NULL value, and the list cannot be terminated

A reference pointer has the following characteristics:

· It always points to valid storage; it can never have a NULL value.

· Its value does not change during a call; it always points to the same storage on return from the call as it did when the call was made.

· It does not support aliasing; it cannot point to a storage area that is pointed to by any other pointer used in a parameter of the same operation

2.

C++ is often considered as a superset of C, but this is not strictly true. Most C code can easily be made to compile correctly in C++, but there are a few differences that cause some valid C code to be invalid in C++, or to behave differently in C++.

Perhaps the most commonly encountered difference is that C allows implicit conversion from void* to other pointer types, but C++ does not. So, the following is valid C code:

int *i = malloc(sizeof(int) * 5);     /* Implicit conversion from void* to int* */

but to make it work in both C and C++ one would need to use an explicit cast:

int *i = (int *) malloc(sizeof(int) * 5);

Another common portability issue is that C++ defines many new keywords, such as this and class, that may be used as identifiers (e.g. variable names) in a C program.

3.

Of course, given any magic square, rotating it or reflecting it will produce another magic square.  Not counting these as distinct, it is known that there is only one normal magic square, and there are 880  normal magic squares.  The number of normal magic squares increases dramatically as the size of the square increases.  For instance, there are over 13 million normal magic squares!


 
Is this answer useful? Yes | No
July 30, 2006 22:41:06   #2  
lr        

RE: 1 What is reference pointer?2 Which C featur...
its very good and useful to share
 
Is this answer useful? Yes | No

 Related Questions

1 What is reference pointer?2 Which C features are not in C++?3 Write a program of spiral matrix.4 Write a program of magic square.
Read Answers (2) | Asked by : Fakhruddin
Tags : Pointer


 Sponsored Links

 
Related Articles

jQuery Reference

jQuery Reference Guide by Jonathan Chaffer and Karl Swedberg A Comprehensive Exploration of the Popular JavaScript Library jQuery Reference Guide packtpub com jquery reference guide Open Source book Anatomy of a jQuery Script He s got a brand new start Now he s a happy guy Categ
 

C++ Void Pointer and Null Pointer

C Void Pointer and Null Pointer In this C tutorial you will learn about two interesting types of pointers; void pointers and Null Pointer These pointers will be discussed in conjunction with syntax usage and example mosgoogle center Pointer to Void General Syntax void pointer variable; Void is use
 

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

How to develop compile and run a C program

The steps involved in building a C program are: 1. First program is created by using any text editor and the file is stored with extension as .c 2. Next the program is compiled. There are many compilers available like GNU C compiler called as gcc, Sun compiler, Borland compiler which is pop
 

ADO.NET new Features in SQL Server 2005

The new features of ADO.NET are: 1. Query change notifications 2. multiple active result sets 3. Native type support 4. Notification support for SQL Server queries. The above features make for greater flexibility and scalability and commands can now be sent to the SQL Server to request that a notifi
 

WinRunner Features

For those of you who are using WinRunner 7.5 or higher, you will find that the program has a number of advanced features. These features are designed to make the software application much more efficient. Understanding these features as well as their functions will allow developers to maximize the ca
 

Client Server Features

Client Server Features Web Server Introduction Web servers are the machines or programs from which requests are made and fulfilled over the Internet They provide one of the endpoints in communication when users request an online service mosgoogle center Clients or users request data through their we
 

Mainframe Features

Mainframe Features In this Mainframe tutorial you will learn about features of Mainframe Processing power memory capacity performance computing multiple operating system time sharing reliability serviceability availability clustering technology and other features available in Mainframe mosgoogle cen
 

JavaScript Object Oriented Features

JavaScript Object Oriented Features In this JavaScript tutorial you will learn about JavaScript Object Oriented Features object type object instantiation using object properties using object methods and achieving object instantiation mosgoogle Object oriented capabilities make any language or applic
 

JavaScript Features

JavaScript Features In this JavaScript tutorial you will learn about features of JavaScript JavaScript as a programming tool dynamic effects browser detection DOM control and other popular JavaScript features mosgoogle A Great Programming Tool for HTML Professional Web designers are undoubtedly adep
 

Related Categories
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape