GeekInterview.com
Series: Subject: Topic:

Languages Interview Questions

 
Sub Categories (+ View)
Subject Name
Questions
Answers
Last updated
587
2199
May
21st,
2013
267
1171
May
12th,
2013
Showing Questions 1 - 20 of 195 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

Which of the following operators cannot be overloaded in c++? A) ?: b)[] c) - d) none of these

Asked By: wproed | Asked On: Sep 17th, 2006

Answered by: gurvinder on: Apr 16th, 2013

a

Answered by: samdas on: Aug 30th, 2008

B)[] and C)-

what is the output? int i=7 printf("%dn",i++*i++);

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Answered by: samantha on: Apr 9th, 2013

i++=8
i++*i++=64

Answered by: nagesh on: Dec 18th, 2012

56 bcoz ++ operator precedence is right to right.......

full form of url? a. Universal resource locator b. Uniform resource locator c. None of these d. Unidentified random locator.

Asked By: Interview Candidate | Asked On: Jul 25th, 2005

Answered by: avinash on: Jan 21st, 2013

Uniform resource Locator

Answered by: prasad on: Dec 13th, 2012

Universel Resource Locator

A tricky question

Asked By: Swati Goel | Asked On: Dec 1st, 2012

A financial year is start from 1 april of every year and end on 31 march of next year. Write a C program to find number of months and number of days between two dates in a given financial year. E.G if d1=5/4/2012 and d2=23/2/2013 are given, find the no. Of days between these two dates.

Answered by: agnes rapau on: Dec 12th, 2012

The days between 05/04/2012 and 23/02/2013 are 323 days

the binary equivalent of 188 is

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Answered by: faith on: Dec 2nd, 2012

The answer is 10111100

Answered by: Suhas on: Nov 18th, 2005

10111100

Wipro technical interview

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Main() { int a[]={0 1 2 3}; int *b; b=&a[2]; printf("%d",b[-1]); } technical interview

Answered by: Munna541 on: Oct 27th, 2012

Subscript operators always takes negative number as positive. so ans is 1

Answered by: nawinbalu on: Oct 11th, 2012

negative subscripts are allowed but the declaration of the array is not right there should be comas between them

stacks and queues are a. Primitive data structures b. Non-primitive data structures c. Non-linear data structures.... d. Data types

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Answered by: Munna541 on: Oct 27th, 2012

B. non-primitive datastructures

Answered by: cicily athira on: Sep 23rd, 2012

answer- stack and queue are non linear data structures

the protocol used to transfer web pages a. Http b. Ftp c.Tcp/ip

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Answered by: Munna541 on: Oct 27th, 2012

A.HTTP
it is used to display web pages from one place to another place

Answered by: santosh aavula on: Oct 4th, 2012

A. HTTP

what is the output of the program? int n=f,m; n==m++; m==++n; printf(n, m);

Asked By: Interview Candidate | Asked On: Sep 4th, 2005

Answered by: jitendra.khedar on: Oct 12th, 2012

Error, undefinrd symbol f..

Answered by: mathankumar on: Feb 1st, 2012

"n=m m=1+n"

Code
  1. "n=m
  2. m=1+n"

4 hp programming languages

Asked By: dbarbour | Asked On: Sep 27th, 2012

What are the 4 programminglanguages that hp uses?

With every use of memory allocation function should be used to release allocated memory which is no longer needed ?

Asked By: Interview Candidate | Asked On: Mar 18th, 2005

A) dropmem() b) dealloc() c) release() d) free()

Answered by: Md. Asaduzzaman(IDB IT Shcholar R-14 C#) on: Sep 25th, 2012

d) free()

Answered by: lara.harsh on: Dec 15th, 2009

d) free()

what is the specialty of .Net? a. Language independence b. Platform independent c. Ide independent d. None of these

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

a

Answered by: manjit kaur on: Sep 11th, 2012

language independence

Answered by: on: Feb 3rd, 2012

A. Language Independence

which key in any windows screen is used to invoke file menu?

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

alt+f

Answered by: manjit kaur on: Sep 11th, 2012

F10 AND ALT+F

Answered by: vin18 on: May 23rd, 2011

alt+f

Unary and binary operator

Asked By: Kamande Joseph | Asked On: Oct 27th, 2009

Explain the concept of unary and binary operator overloading giving suitable examples.

Answered by: manjit kaur on: Sep 11th, 2012

unary operator takes a single operand..exampleof (incerement ++ and decrement -- operators).unary also classified as 1.simple prefix unary operator ,example the (-)minusoperator 2.pre and post increme...

Answered by: angel421 on: Sep 9th, 2011

Please guys, check your answer before, I saw many of them wrong on this website. The above "binary operators" description should say this: (++ and -- are Unary by the way....) The binary operators ...

Remove a file

Asked By: myhome | Asked On: Aug 22nd, 2008

How will you remove a file with the name '-somethink'?

Answered by: ramkrsingh on: Aug 28th, 2012

rm /-somethink

Kernel executes the first process when system starts

Asked By: Interview Candidate | Asked On: Jul 31st, 2004

Ans :- init();

Answered by: ramkrsingh on: Aug 25th, 2012

In Linux perspective a system start up flow of control is as follows: 1. BIOS :- Performs basic power on test which initializes CPU, RAM, had disk, mouse, keyboard, video display etc. 2. Boot Loader :...

Which hardware implements stack operation in 8085/8086

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

A. Rom b. Prom c. Ram d. None of these answer:c.Ram

Answered by: ramkrsingh on: Aug 25th, 2012

C. RAM.
To confirm just check memory allotment for 8085.

C language

Asked By: yekkalarajesh | Asked On: May 25th, 2012

Write a function to find how many binary 1s nd 0s present in a number

Answered by: Arupananda Pradhan on: Aug 13th, 2012

Code
  1. #include<stdio.h>
  2. int main()
  3.  {
  4.     int no,i,count =0;
  5.     printf("enter a number");
  6.     scanf("%d",&no);
  7.     for(i =0,i<16;i++)
  8.      {
  9.         if((no & 0x8000) == 0x8000)
  10.            count++;
  11.         no = no << 1;
  12.     }  // end of loop
  13.  
  14.  printf("The number of 1 in %d is %d",no,count);
  15.  
  16. return 0;
  17. } //main function end<pre>

    Code
    1. #include<stdio.h></span></div></li>
    2. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"><span style="color: #993333">int</span> main<span style="color: #009900">(</span><span style="color: #009900">)</span></div></li>
    3. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"> <span style="color: #009900">{</span></div></li>
    4. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">    <span style="color: #993333">int</span> no<span style="color: #339933">,</span>i<span style="color: #339933">,</span>count <span style="color: #339933">=</span><span style="color: #0000dd">0</span><span style="color: #339933"></span></div></li>
    5. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">    <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066">printf</span></a><span style="color: #009900">(</span><span style="color: #ff0000">"enter a number"</span><span style="color: #009900">)</span><span style="color: #339933"></span></div></li>
    6. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">    scanf<span style="color: #009900">(</span><span style="color: #ff0000">"%d"</span><span style="color: #339933">,&</span>no<span style="color: #009900">)</span><span style="color: #339933"></span></div></li>
    7. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">    <span style="color: #b1b100">for</span><span style="color: #009900">(</span>i <span style="color: #339933">=</span><span style="color: #0000dd">0</span><span style="color: #339933">,</span>i<span style="color: #339933"><</span><span style="color: #0000dd">16</span><span style="color: #339933"></span>i<span style="color: #339933">++</span><span style="color: #009900">)</span></div></li>
    8. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">     <span style="color: #009900">{</span></div></li>
    9. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">        <span style="color: #b1b100">if</span><span style="color: #009900">(</span><span style="color: #009900">(</span>no <span style="color: #339933">&</span> 0x8000<span style="color: #009900">)</span> <span style="color: #339933">==</span> 0x8000<span style="color: #009900">)</span></div></li>
    10. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">           count<span style="color: #339933">++</span></div></li>
    11. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">        no <span style="color: #339933">=</span> no <span style="color: #339933"><<</span> <span style="color: #0000dd">1</span><span style="color: #339933"></span></div></li>
    12. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal">    <span style="color: #009900">}</span>  <span style="font-style: italic">// end of loop</span></div></li>
    13. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"> </div></li>
    14. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"> <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066">printf</span></a><span style="color: #009900">(</span><span style="color: #ff0000">"The number of 1 in %d is %d"</span><span style="color: #339933">,</span>no<span style="color: #339933">,</span>count<span style="color: #009900">)</span><span style="color: #339933"></span></div></li>
    15. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"> </div></li>
    16. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"><span style="color: #b1b100">return</span> <span style="color: #0000dd">0</span><span style="color: #339933"></span></div></li>
    17. <li style="background: #fcfcfc"><div style="font-family: 'Courier New', Courier, monospace font-weight: normal font-style: normal"><span style="color: #009900">}</span> <span style="font-style: italic">//main function end</span></div></li></ol></div></p></pre>

Answered by: vasi7999 on: Jun 3rd, 2012

The c program is as follows :

Code
  1. #include<stdio.h>
  2. #include<conio.h>
  3.  
  4. void main()
  5. {
  6.  
  7. int a[10],n=0,o=0,z=0,l;
  8. clrscr();
  9.  
  10. Enter the number of digits in the given number : ");
  11. scanf("%d",&l);
  12.  
  13. Enter the Binary number one by one: ");
  14.  
  15. for(i=0;i<l;i++)
  16. {
  17. scanf("%d",&a[i]);
  18. }
  19.  
  20. for(i=0 ; i<l ;   i++)
  21. {
  22. n=a[i];
  23.  
  24. if(n==0)
  25. o++;
  26.  
  27. else
  28. z++;
  29.  
  30. }
  31.  
  32. The Number of Zeros is : %d",z);
  33.  
  34. The Number of Ones is : %d",o);
  35.  
  36. getch();
  37.  
  38. }

Process id of kernel

Asked By: Interview Candidate | Asked On: Jul 25th, 2005

(a) 1 (b) 0 (c) 2 (d) none

Answered by: Raghavendra c on: Jun 30th, 2012

b) 0

Answered by: mangalshrey on: Jan 26th, 2011

zero

What is the output of the program?

Asked By: Interview Candidate | Asked On: Jul 7th, 2005

Main() { char a='123' printf ("%c n",a); return 0; } a. Ascii value of 121 b. 1 c. 3 d. None of these

Answered by: akshay on: May 3rd, 2012

The answer is either 3 or its ascii value 51 depending on the compiler.

Answered by: leeyaitb2w on: Jun 30th, 2010

ANSWER:(A)ASCII Value of 123

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Question Categories

C Interview Questions

C++ Interview Questions

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.