Sahara anounced its Intel Celeron NB

As part of its effort towards increasing computer penetration within the country, South-Africa based Sahara Computers and Electronics Limited (SCEL) has announced the availability of its latest Intel Celeron based notebook, the NB5610-L1.

The NB5610-L1 weighs around 2.5Kg, and features Intel's Celeron M Processor 360; 256 MB DDR RAM upgradeable up to 2 GB; 40GB HDD; 14.1-inch TFT-LCD display; Wi-Fi support; built-in stereo with 3D sound effects; DVD/CD-RW combo drive; and pre-programmed application launch keypad with functions including Internet browser, volume mute, WLAN activation plus email.

SCEL's NB 5610 - L1 incorporates 4 USB 2.0 ports and one port each for sound/volume control; S-Video TV Out port; DC in Jack; Headphone Out Jack; Microphone Jack; and compatible RJs for phone plus LAN.

Speaking at the occasion, George Van Der Merwe, chief operating officer, SCEL, said, "The launch of this notebook reflects SCEL's strategy of offering carefully tailored mobile solutions to the newly emerging markets in India like students, young executives, SOHO etc."

"Our new endeavour has been made possible because of SCEL's sound vendor relationship spanning the globe, and high economies of scale undertaken in the process. We are confident that our latest offering, which is at a price that is marginally higher than a desktop PC, will create fresh demands in the market," Van Der Merwe said.

NB5610-L1 is available nation-wide through Sahara authorized dealers, at a price of Rs 25,999. Over 1,200 certified engineers from SCEL will be made available for customer service on the national toll free number - 1800 180 SCEL (7235).

Nokia Phones Prices in march

Idea Launches One india Plan

Idea presents One India Tariff on Pre and Post Paid

*Local and STD calls at Re 1 New Delhi, March 2, 2006: IDEA Cellular, India’s leading cellular operator, today announced its One India Tariff plans for it’s pre and post paid customers, just one week after launching the revolutionary 2 Minutes Outgoing Free to any phone anywhere in India.
In the Pre Paid segment:
Recharge 249:
o All Local and STD calls at Re 1
o Zero Talk time
o One Month Validity for Tariff
Recharge 899:
o All local and STD calls at Re 1
o Rs 550 Talk time
o One-month validity.
In the Post Paid segment:
Total Rental 299
o Idea to Idea (Local) at Re 1 for 2 mins.
o All other Local and STD calls at Re 1.
Commenting on the offering, Mr. Vikram Mehmi, CEO, Idea Cellular Ltd said “This launch is only a reaffirmation of our commitment to pass on any and all benefits to our valued customers. I am confident that with both our 2 Minutes Outgoing Free and One India Plan, we will address the needs of Outgoing users and bring in higher ARPU customers into our fold. The two offers are unmatched in the industry presently and I am confident of it working well”

Kyocera launched its new phone KOI

Kyocera Wireless Corp - a global manufacturer of CDMA wireless phones and devices, announced the immediate availability of its megapixel camera phone - "Kyocera Koi" in the country. The Koi marks Kyocera's entry into the megapixel camera phone market. Kyocera Koi has a "swivelling" design and a large external display. It features a 1.2 megapixel digital camera with built-in flash and 5x digital zoom; MPEG-4 video record and playback; and 16 megabytes (MB) of onboard memory. Koi provides a camera phone solution with sharp resolution for saving, printing and framing photos as large as 4-inches x 6-inches. The handset also features a sliding protective lens cover, to protect the lens from scratches.

Expanding on Kyocera's renowned user interface, the phone features an user-friendly "pinwheel" menu option to quickly scroll through its many features. It also has large, easy-to-press keys for number input and text messaging. Weighing 114 grams and measuring 100 x 50 x 25 mm, the Kyocera Koi is priced at approximately Rs 15, 600 (MRP), and is available in 14 cities across the country.

Benq starting in 10 cities

Post the launch of the first BenQ IT Zone in Delhi on Feb 14 in association with BenQ's channel partner, Skope, the company has now announced plans to open BenQ IT Zones in ten major cities including Mumbai, Kolkota, Pune, Ahemadabad, Chandigarh, Chennai, Hyderabad, Guwahati and Bangalore. Ish Bawa, head - marcom, BenQ India, said, "Eighty percent of sales for the LCD monitors happen in these major cities, and thus we will concentrate on these cities first and later will spread across the country. Though the IT zone will display the entire range of BenQ products, it will focus more on LCD monitors of all types."
According to company sources, the BenQ IT Zone is expected to reach out to brand-conscious and digitally inclined customers to help them make a pertinent choice. The IT zone will display the largest available collection of BenQ LCD Monitors, including wall mounting monitors, touch panel monitors, etc, for customers to experience live demos and realize the difference. Customers visiting the IT zones in the country will be able to experience hi-end technologies such as Fast Response Time, AMA, Senseye, and TV Tuner Application, for their individual requirement of LCD monitors. BenQ plans to promote its "shop-n-shop" concept with BenQ spots at various locations. Bawa said, "The IT Zone will certainly make BenQ products more affordable to Indian customers, and provide them the unique experience of feeling the quality and performance of every product before purchase. The Zones will have trained executives to advise the customer about the best suitable product for them". BenQ's IT Zone will be a platform to present Hi-tech & Hi-touch IT products. It will showcase BenQ offerings such as LCD Monitors, Joybooks, keyboards and Optic Mice. BenQ intends to establish 50 BenQ IT Zones across the country this year; with the next such zone soon coming up at Andheri in Mumbai by March 15.

Bloggers Update urs blog now on Sony Ericsson


Sony Ericsson has announced a tie-up with Google, to incorporate the search giant's Web search and Blogger features in its mobile phones.

The company said that Google's search engine will become the standard search engine for all its Internet phones. Google's search feature will be tightly integrated into Sony Ericsson's phones, so as to enable consumers to directly activate a Google Web search option from whichever page they are viewing, sans the need to launch a new Web page to complete the search.

As regards Google's Blogger feature, through software preloaded on Sony Ericsson's phones, subscribers of Blogger.com will be able to update their personal blogs from their cell phones. Sony Ericsson says it is the first company to offer an integrated blogging tool on its phones.

Jan Wareby, corporate executive vice president, Sony Ericsson, said that with the phenomenal growth in blogging, the company sees working with Google as offering people a quick and easy way to blog.

Nikesh Arora, vice president, Google said that by providing users with direct access to features like mobile search and blogging, Google will be able to create a more personalized and user-friendly experience.

Got boared of Biggies

Live the digital life in stylish simplicity — up to four times faster. Just 6.5 inches square and 2 inches small, Mac mini lets you have more fun with your music, photos and movies, more quickly and more easily. Enjoy them up close or far away with the included Apple Remote. The most affordable way to Intel Core, iLife ’06, and Front Row starts at $599.

After the stereo system apple also have introduced mac mini working on intel duel co-

Power has never been this economical

Mac mini makes it easy and affordable to work with digital photos, movies, music, and the web. And now it all happens with the blazing speed of the Intel Core, in either Solo or Duo configurations. Choose the Solo for a low-cost entry to iLife ’06. Or select the Duo model for unprecedented power in such a small package — up to four times faster than previously. Coupled with an all new architecture and the world’s most advanced operating system, Mac OS X, Mac mini runs all your modern and innovative software, speedily.

Your digital life starts here

Mac mini comes with iLife ’06, a suite of easy-to-use applications that make the spectacular part of your everyday life. Enhance, organize and share your photos via iPhoto. Create calendars, books, and cards. Make an epic starring your kid in iMovie. Turn your photo and movie creations into professional DVDs with iDVD. Create original music in GarageBand, even if you can’t carry a tune. Make podcasts and blogs. Then publish them online via .Mac and the all-new iWeb.2 You’ll be amazed at how quickly, easily, and beautifully you can share your digital life.

Now showing

The full-screen Front Row media experience — with its intuitive menus, large text and brilliant graphics — lets you browse the music, photos, and videos on your Mac mini as easily as you browse music on your iPod. The included Apple Remote lets you enjoy your media from anywhere in the room from your desk chair to favorite sofa. Front Row and Mac mini can even play music, photos, and videos saved on other computers in the house,thanks to Bonjour instant networking.3 So gather your friends and dazzle them with a slideshow of your vacation pics, a home movie, your latest playlist, or a DVD.

More Mac per square inch

Inside its petite 2-inch tall, 6.5-inch square anodized aluminum enclosure, Mac mini houses that fast Intel Core processor, a 60 or 80GB hard drive, slot-loading Combo or SuperDrive, as well as built-in wireless — all whisper-quiet. This modular design lets you upgrade your current system to the elegance, simplicity and reliability of Macintosh without a lot of extra expense. BYODKM: Bring your own monitor, keyboard and mouse (or buy new ones). Either way you’ll be up and running in minutes.

Mac mini also gives you plenty of room to grow, with more expansion options than previous models. Simply connect your digital devices, such as cameras, iPod, printer, camcorder or keyboard to the Mac mini over USB 2.0 or FireWire. Share files around your house at blazing speeds with built-in 10/100/1000 BASE-T Ethernet. Enjoy high quality sound on almost any speaker system with double-duty analog/digital audio. Record digital and analog sources through the line in, perfect for your latest podcast in GarageBand. Mac mini gives you built-in amenities you need to enjoy the digital lifestyle.

i-pods Stereo Hi-Fi








Fill your home with sound, not stereo components. Keep your music collection at your fingertips, not in countless CD cases. Change the way you experience digital music. For $349, iPod Hi-Fi delivers crystal-clear, audiophile-quality sound in a clean, compact design. Hear, hear.

The words from i-pod introducing hi-fi stereo system.

The new stereo unit is a 17-inch wide white box with black grille, weighing approximately 16.7 pounds, with remote control and built-in handles, and runs on D-cell batteries.

Rock-solid enclosure

The innovative design of iPod Hi-Fi transforms consumer-grade materials into the ideal enclosure for high-fidelity sound. The high-end sound of iPod Hi-Fi pours out of a double-walled plastic shell redesigned for maximum stiffness to prevent vibration and resonance — two major causes of sonic imperfection. And airtight sealing allows voluminous, unobstructed sound, effectively preventing buzzing and clatter.

The right balance

iPod Hi-Fi features three speaker cones custom designed to provide balanced sound across the frequency range. The result of numerous rigorous acoustic tests, this design delivers room-filling stereo imaging. The two 80 mm wide-range cones are set in dedicated chambers and isolated on the front plate, providing mid and high frequencies that sound vivid and bright. The natural bass of iPod Hi-Fi is generated by a 130 mm woofer. Thanks to the airtight sealing, the low frequencies are enriched inside the enclosure and then directed via tuned tubes through ports in the front.

Energy bar

No need to find a place to hide an unsightly power brick, as iPod Hi-Fi houses all power components internally. Or run iPod Hi-Fi on six D-cell batteries(1). Either way, it plays your music with big, warm sound. In DC mode, custom electronics manage the energy to enhance battery life and sound, even adjusting volume as necessary. And iPod Hi-Fi will charge your iPod from its batteries when the iPod runs low.

Another c Paper

0) void main()

{

int *i = 0x400; // i points to the address 400

*i = 0; // set the value of memory location pointed by i;

}

Answer:

Undefined behavior

Explanation:

The second statement results in undefined behavior because it points to some location whose value may not be available for modification. This type of pointer in which the non-availability of the implementation of the referenced location is known as 'incomplete type'.

1) #define assert(cond) if(!(cond)) \

(fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\

__FILE__,__LINE__), abort())

void main()

{

int i = 10;

if(i==0)

assert(i <>

else

printf("This statement becomes else for if in assert macro");

}

Answer:

No output

Explanation:

The else part in which the printf is there becomes the else for if in the assert macro. Hence nothing is printed.

The solution is to use conditional operator instead of if statement,

#define assert(cond) ((cond)?(0): (fprintf (stderr, "assertion failed: \ %s, file %s, line %d \n",#cond, __FILE__,__LINE__), abort()))

Note:

However this problem of “matching with nearest else” cannot be solved by the usual method of placing the if statement inside a block like this,

#define assert(cond) { \

if(!(cond)) \

(fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\

__FILE__,__LINE__), abort()) \

}

2) Is the following code legal?

struct a

{

int x;

struct a b;

}

Answer:

No

Explanation:

Is it not legal for a structure to contain a member that is of the same

type as in this case. Because this will cause the structure declaration to be recursive without end.

3) Is the following code legal?

struct a

{

int x;

struct a *b;

}

Answer:

Yes.

Explanation:

*b is a pointer to type struct a and so is legal. The compiler knows, the size of the pointer to a structure even before the size of the structure

is determined(as you know the pointer to any type is of same size). This type of structures is known as ‘self-referencing’ structure.

4) Is the following code legal?

typedef struct a

{

int x;

aType *b;

}aType

Answer:

No

Explanation:

The typename aType is not known at the point of declaring the structure (forward references are not made for typedefs).

5) Is the following code legal?

typedef struct a aType;

struct a

{

int x;

aType *b;

};

Answer:

Yes

Explanation:

The typename aType is known at the point of declaring the structure, because it is already typedefined.

6) Is the following code legal?

void main()

{

typedef struct a aType;

aType someVariable;

struct a

{

int x;

aType *b;

};

}

Answer:

No

Explanation:

When the declaration,

typedef struct a aType;

is encountered body of struct a is not known. This is known as ‘incomplete types’.

7) void main()

{

printf(“sizeof (void *) = %d \n“, sizeof( void *));

printf(“sizeof (int *) = %d \n”, sizeof(int *));

printf(“sizeof (double *) = %d \n”, sizeof(double *));

printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *));

}

Answer :

sizeof (void *) = 2

sizeof (int *) = 2

sizeof (double *) = 2

sizeof(struct unknown *) = 2

Explanation:

The pointer to any type is of same size.

8) char inputString[100] = {0};

To get string input from the keyboard which one of the following is better?

1) gets(inputString)

2) fgets(inputString, sizeof(inputString), fp)

Answer & Explanation:

The second one is better because gets(inputString) doesn't know the size of the string passed and so, if a very big input (here, more than

100 chars) the charactes will be written past the input string. When fgets is used with stdin performs the same operation as gets but is safe.

9) Which version do you prefer of the following two,

1) printf(“%s”,str); // or the more curt one

2) printf(str);

Answer & Explanation:

Prefer the first one. If the str contains any format characters like %d then it will result in a subtle bug.

10) void main()

{

int i=10, j=2;

int *ip= &i, *jp = &j;

int k = *ip/*jp;

printf(“%d”,k);

}

Answer:

Compiler Error: “Unexpected end of file in comment started in line 5”.

Explanation:

The programmer intended to divide two integers, but by the “maximum munch” rule, the compiler treats the operator sequence / and * as /* which happens to be the starting of comment. To force what is intended by the programmer,

int k = *ip/ *jp;

// give space explicity separating / and *

//or

int k = *ip/(*jp);

// put braces to force the intention

will solve the problem.

11) void main()

{

char ch;

for(ch=0;ch<=127;ch++)

printf(“%c %d \n“, ch, ch);

}

Answer:

Implementaion dependent

Explanation:

The char type may be signed or unsigned by default. If it is signed then ch++ is executed after ch reaches 127 and rotates back to -128. Thus ch is always smaller than 127.

12) Is this code legal?

int *ptr;

ptr = (int *) 0x400;

Answer:

Yes

Explanation:

The pointer ptr will point at the integer in the memory location 0x400.

13) main()

{

char a[4]="HELLO";

printf("%s",a);

}

Answer:

Compiler error: Too many initializers

Explanation:

The array a is of size 4 but the string constant requires 6 bytes to get stored.

14) main()

{

char a[4]="HELL";

printf("%s",a);

}

Answer:

HELL%@!~@!@???@~~!

Explanation:

The character array has the memory just enough to hold the string “HELL” and doesnt have enough space to store the terminating null character. So it prints the HELL correctly and continues to print garbage values till it accidentally comes across a NULL character.

15) main()

{

int a=10,*j;

void *k;

j=k=&a;

j++;

k++;

printf("\n %u %u ",j,k);

}

Answer:

Compiler error: Cannot increment a void pointer

Explanation:

Void pointers are generic pointers and they can be used only when the type is not known and as an intermediate address storage type. No pointer arithmetic can be done on it and you cannot apply indirection operator (*) on void pointers.

16) main()

{

extern int i;

{ int i=20;

{

const volatile unsigned i=30; printf("%d",i);

}

printf("%d",i);

}

printf("%d",i);

}

int i;

17) Printf can be implemented by using __________ list.

Answer:

Variable length argument lists

18) char *someFun()

{

char *temp = “string constant";

return temp;

}

int main()

{

puts(someFun());

}

Answer:

string constant

Explanation:

The program suffers no problem and gives the output correctly because the character constants are stored in code/data area and not allocated in stack, so this doesn’t lead to dangling pointers.

19) char *someFun1()

{

char temp[ ] = “string";

return temp;

}

char *someFun2()

{

char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’};

return temp;

}

int main()

{

puts(someFun1());

puts(someFun2());

}

Answer:

Garbage values.

Explanation:

Both the functions suffer from the problem of dangling pointers. In someFun1() temp is a character array and so the space for it is allocated in heap and is initialized with character string “string”. This is created dynamically as the function is called, so is also deleted dynamically on exiting the function so the string data is not available in the calling function main() leading to print some garbage values. The function someFun2() also suffers from the same problem but the problem can be easily identified in this case.

Ericsson to put footprints in chennai

Ericsson announced the opening of its first R&D facility in India, and Global Service Delivery Center (GSDC) at Chennai, one year after it set up its manufacturing unit for Radio Base stations in Jaipur.

The new Ericsson facility was inaugurated by Dayanidhi Maran, Union Minister of Communications and Information Technology, in the presence of Inga Eriksson Fogh, the Swedish Ambassador to India.

The R&D facility will focus on developing value-added applications for the pre-paid and multimedia segments, and the Global Service Delivery Center will cater to global customers.

Dayanidhi Maran said, "I congratulate Ericsson on having chosen Chennai to set up its first R&D facility and GSDC in India. It is a reiteration of the company's commitment to India. I have visited the manufacturing plant at Jaipur and am proud to say that Ericsson is creating world-class research, manufacturing and service delivery capabilities in India."

Mats Granryd, managing director, Ericsson India, said, "We have been in the country for over a hundred years now. The Ericsson R&D facility in Chennai is part of our global R&D set-up to offer cutting-edge solutions to our global customer base. The GSDC will focus on providing Service Integration capabilities for complex telecom projects to our global customers."


HUTCH to allow balance transfer bet delhi prepaid user









Though AIRTEL have started allowing its delhi based prepaid customers transfering balanece bet its subscribers with charges 10 rs/transmission.
HUTCH come late but with promising state to charges of 5 rs/transfer only. The subscriber needs to type bal (space) receiver's Hutch number (space) amount to be transferred, and send it as an SMS to 144.

Narnia a long awaited film in india

Hi Its not the site of technology only it will deal with the indian entertainment also so here i am giving u the review of narnia
Hi narnia it comes in hindi in India here a quite late at my place so a delayed review well its good to see it in hindi itself. The tale begins during World War II with Lucy, Peter, Edmund and Susan Pevensie leaving the tenuous life of war and destruction to one of hope and inspiration .
The story begins when the four go to live with their elderly, distant relative, Professor Diggory who lives in a great estate in the country. The children play a game of hide and seek to pass the time. The youngest of the four, Lucy finds a mysterious wardrobe and hides there waiting to be sought.


another world in which time stands still for those on the other side. In Narnia, Lucy befriends Mr. Thomas, a fawn that is under orders from the evil White Witch, Jadis to capture the four children who are the prophecy that will destruct her kingdom. Lucy finds her way back from the wardrobe and brings her bother Edmund back to Narnia. When the two tell Susan and Peter about their find, they are not believed. Edmund has the reputation for telling lies.

Soon, the four return to the wardrobe and find that there is, indeed, a world on the other side and find themselves in an unimaginable adventure with the ultimate and classic tale of good versus evil. Each child has a gift bestowed upon them by St. Nick that helps them to discover themselves and cope with their feats that lie ahead.

Narnia is a vast land that is doomed by the self proclaimed Queen, Jadis, the White Witch. She is one of the best adapted characters. Although her face is made very simple and pale, her costumes and headdresses are not. With each mood, the color of her gown takes on a different hue. Her hairdo changes with each costume, always the dreadlocks and icecles to accessorize the effect. As Jadis represents evil, Aslan, the Lion, represents good. With the voice talent of Liam Neeson, Aslan is well done and my second favorite character (as done in this movie-Jadis is the first).

The breathtaking scenery, filmed partly in
New Zealand is outstanding. Greenery and winter ice are over the top. The cinematography is the best, providing a vast landscape for battle and high mountains and water for adventurous feats. I felt with each scene the warmth and chilling air that accompanied the story.

The special effects were fantastic. The Lion and Queen were great, but the characters were excellent and true. On Jadis’ side, the one eyed monsters, the wolves, the bad dwarves and even meaner giants. In the Witches world, those who have lost battle are turned to stone-dark and cold, helpless and lost. On Aslan’s side, there are mermaids, Nymphs, Unicorns, all as one would expect, only better!

The first half of the film was a bit slow and concerning for me, but as the story unfolded I found myself glued to my seat and engaged. Although not as engaging in the beginning as the Harry Potter movies, the last half of the movie was full of action. The best, of course, was the battle between Jadis and Aslan. Without giving away any details, I have to at least mention my favorite scene: Peter and The White Witch Jadis are in a one-on-one battle. Jadis has yet one of the best costumes of the entire film-look closely to her hair, gown and ’’fur’’. She is a very apt warrior and holds her own. Her double sword action is outstanding. Even better, there was no gore!

At last it is a must seen movie specialy with your childrens.



Vista Will be delivered in 6 Flavours


The long waiting Windows Vista is going to get delivered later this year so microsoft have announced its product versions.



two for businesses, three for consumers, and one for emerging markets: Windows Vista Business, Windows Vista Enterprise, Windows Vista Home Basic, Windows Vista Home Premium, Windows Vista Ultimate and Windows Vista Starter.

Mike Sievert, corporate vice president - windows product management and marketing, Microsoft, said, "We live in a digital world that is filled with more information, more things to do and more ways to communicate with others than ever. The PC needs to give people the clarity and confidence to handle this 'world of more' so they can focus on what's most important to them. With our Windows Vista product line, we've streamlined and tailored our product lineup to provide what our customers want for today's computing needs."

All versions of Windows Vista are scheduled to be broadly available in the second half of 2006.

A Pc Buying senario

AMD Athlon 64 3000+ Socket 939 CPU (Rs. 6,000)
Gigabyte GA-K8N51GMF-9 Motherboard (Rs. 4,700)
Transcend 512 MB DDR-400 RAM (Rs 2,300)
Any ATX Cabinet with 300 Watts SMPS (Around Rs 1,200)
160 GB 7200 RPM Seagate Barracuda Hard Disk (Rs. 3,600)
Samsung SyncMaster 793S Monitor (Rs. 5,250)
Lite-On SOHW-165S DVD Writer (Rs. 2,800)
Onboard Realtek ALC880 8-channel audio
Artis S500 2.1 channel Speakers (Rs 1,250)
Any Keyboard and Mouse(Around Rs 700-800)

Total cost goes below 30,000

Well hers the c first paper

1. #include
main()
{
int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };
int *p,*q;
p=&a[2][2][2];
*q=***a;
printf("%d----%d",*p,*q);
}
Answer:
SomeGarbageValue---1
Explanation:
p=&a[2][2][2] you declare only two 2D arrays, but you are trying to access the third 2D(which you are not declared) it will print garbage values. *q=***a starting address of a is assigned integer pointer. Now q is pointing to starting address of a. If you print *q, it will print first element of 3D array.

2. #include
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s;
printf("%d",s->x);
printf("%s",s->name);
}
Answer:
Compiler Error
Explanation:
You should not initialize variables in declaration

3. #include
main()
{
struct xx
{
int x;
struct yy
{
char s;
struct xx *p;
};
struct yy *q;
};
}
Answer:
Compiler Error
Explanation:
The structure yy is nested within structure xx. Hence, the elements are of yy are to be accessed through the instance of structure xx, which needs an instance of yy to be known. If the instance is created after defining the structure the compiler will not know about the instance relative to xx. Hence for nested structure yy you have to declare member.

4. main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
Answer:
hai
Explanation:
\n - newline
\b - backspace
\r - linefeed

5. main()
{
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}
Answer:
45545
Explanation:
The arguments in a function call are pushed into the stack from left to right. The evaluation is by popping out from the stack. and the evaluation is from right to left, hence the result.

6. #define square(x) x*x
main()
{
int i;
i = 64/square(4);
printf("%d",i);
}
Answer:
64
Explanation:
the macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64

7. main()
{
char *p="hai friends",*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
}
Answer:
ibj!gsjfoet
Explanation:
++*p++ will be parse in the given order
Ø *p that is value at the location currently pointed by p will be taken
Ø ++*p the retrieved value will be incremented
Ø when ; is encountered the location will be incremented that is p++ will be executed
Hence, in the while loop initial value pointed by p is ‘h’, which is changed to ‘i’ by executing ++*p and pointer moves to point, ‘a’ which is similarly changed to ‘b’ and so on. Similarly blank space is converted to ‘!’. Thus, we obtain value in p becomes “ibj!gsjfoet” and since p reaches ‘\0’ and p1 points to p thus p1doesnot print anything.

8. #include
#define a 10
main()
{
#define a 50
printf("%d",a);
}
Answer:
50
Explanation:
The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.

9. #define clrscr() 100
main()
{
clrscr();
printf("%d\n",clrscr());
}
Answer:
100
Explanation:
Preprocessor executes as a seperate pass before the execution of the compiler. So textual replacement of clrscr() to 100 occurs.The input program to compiler looks like this :
main()
{
100;
printf("%d\n",100);
}
Note:
100; is an executable statement but with no action. So it doesn't give any problem

10. main()
{
printf("%p",main);
}
Answer:
Some address will be printed.
Explanation:
Function names are just addresses (just like array names are addresses).
main() is also a function. So the address of function main will be printed. %p in printf specifies that the argument is an address. They are printed as hexadecimal numbers.

27) main()
{
clrscr();
}
clrscr();

Answer:
No output/error
Explanation:
The first clrscr() occurs inside a function. So it becomes a function call. In the second clrscr(); is a function declaration (because it is not inside any function).

28) enum colors {BLACK,BLUE,GREEN}
main()
{

printf("%d..%d..%d",BLACK,BLUE,GREEN);

return(1);
}
Answer:
0..1..2
Explanation:
enum assigns numbers starting from 0, if not explicitly defined.

29) void main()
{
char far *farther,*farthest;

printf("%d..%d",sizeof(farther),sizeof(farthest));

}
Answer:
4..2
Explanation:
the second pointer is of char type and not a far pointer

30) main()
{
int i=400,j=300;
printf("%d..%d");
}
Answer:
400..300
Explanation:
printf takes the values of the first two assignments of the program. Any number of printf's may be given. All of them take only the first two values. If more number of assignments given in the program,then printf will take garbage values.

31) main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}
Answer:
H
Explanation:
* is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H.

32) main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
Answer:
Compiler error: Undefined label 'here' in function main
Explanation:
Labels have functions scope, in other words The scope of the labels is limited to functions . The label 'here' is available in function fun() Hence it is not visible in function main.

Welcome All

Hi all Well this is my second blog first is http://www.conteam.blogspot.com

Purpose of this blog:To deliever indian tech news,celluler news n entertainment news to all my friends and also telling u misleneous things n i will devote one section on the c/c++ aptitude test section specialy for my engg students as i am also one of them.