Latest Discussions

Topic — Add New » Posts Last Poster Freshness
Element repeated thrice 9 RJ 12 minutes

There is an array of N elements in which only one element is repeated thrice and all other elements repeated twice or did not repeat. Can the eleme...

C++: possible encapsulation failure 1 Amit 36 minutes

Consider this program.

#include <iostream>
using namespace std;

class Base {
public:
virtual void foo() { co...

c code 2 Kapil 2 hours

#include<stdio.h>
main(){
int a[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13},b=10,i=0;
b=a[i++ + a[++i]];
b=a[++i+a[++i...

Output of C program? 2 sergey.p 3 hours

The output of the program?

void main()
{
    char  str[5] = “abc”;
    printf (“%s”, &0[str]);
    getchar();
    return 0;
}...
A GATE 2007 CS question 1 Jinn 5 hours

How many distinct paths are there for the robot to reach the point starting from the initial position (0,0)?
(A)20 C 10 
(B) 20 C 2

Does this program cover overriding in C++? 4 Venki 8 hours
#include<iostream>
using namespace std;

class base {
    public:
       int i;
       void show()
       { cout<<" i = "<<i; ...
How can we traverse through all the files in a folder and the subfolders? 2 Misraji 13 hours

How can we traverse through all the files in a folder and the subfolders. What system calls should be used?

C++ operator overloading question 3 Misraji 13 hours

Why certain operators can not be overloaded?

C++ this pointer 2 Misraji 13 hours

When do we have to use this pointer explicitly in our programs?

A virtual base class doubt 2 Angshuman jana 18 hours

Following program prints 8 on Dev CPP compiler.

#include<iostream>
using namespace std;

class base {  int i; };

class d1: public ...
A C question 2 Vineet 1 day

Is there any functional dfference between getch() and getchar()?

Please explain it 2 Venki 2 days

Following code prints 1 to 100 without using loop and without using recursion!!. Could someone please explain how does this code work.

...
an optimum algorithm 3 ahbiv 4 days

pls suggest an 0(n) algorithm..

Why does this program give error? 3 Himanshu 4 days
#include<stdio.h>
int main()
{
  int x[10];
  int (*p)[10];
  p = x;
  getchar();
  return 0;
}
print in if and else 2 Venki 4 days

if(TRUE) {
printf(" Inside IF\n");
} else {
printf("Inside ELSE\n");
}

Is it possible to print both statements??

...
A C malloc() and free() question 4 Venki 4 days
void f(int y)
{
      struct s *ptr;
      ptr = malloc (sizeof (struct)+99*sizeof(int));
}

struct s
{
    int i;
     float p;
};

wh...

A C Puzzle 4 Venki 4 days
int data; // Initialize data during run time
if ( data == -data && data!=0)
       printf ("Miracle!!");

Will miracle ever pri...

Efficient program to find 2nd largest 2 Venki 4 days

How can we find the 2nd largest element in an unsorted array without ever using sorting algorithms. The array also contains repeated elements.

References vs Pointers 6 Venki 4 days

Pros and cons of both?

puzzle 4 geek4u 4 days

can you use tow 3's to make 20 using any mathematical operators

Output of C program? 2 kapil 5 days
#include<stdio.h>
int main(void)
{
 printf("%.*s", 0, "geeksforgeeks");
 getchar();
 return 0;
}
Design and code in C++ to justify a line of text string 1 geek4u 5 days

Design and code in C++ to justify a line of text string: (1) left, (2)
right and (3) full justified.

Output of C program? 1 kamal 5 days
#include<stdio.h>
int main(void)
{
 int i;
 for(i = 0; i < 5; i++)
    printf("\n%*c", i, '*');
 getchar();
 return 0;
}
Output of C++ program? 2 Venki 5 days
#include<iostream>
int f() {
    return 2;
}

class temp
{
  public:
  int operator()() {
    return 1;
  }
};

int main()
{
  temp f;
  s...
Sort the deck of cards with 5 different colors 2 kapil 5 days

Perform the in-place sort on a deck of cards with 5 different colors. Deck having n number of cards and we don't know the exact number of cards of ...

Nine boys and three girls 2 kapil 5 days

Nine boys and three girls had some initial money. They agreed to divide equally their pocket money. Every boy gave an equal sum to every girl, an...

hash 1 jasmin 6 days

i need remove duplicates with using a hash table ...
i have
struct Node{
int data;
Node *next};

struct Hash{
N...

What is the output? 2 s_iiit 1 week
#include<stdio.h>
int main(void)
{
      char *p = NULL;
      {
           char c='A';
           p = &c;
      }
      putchar(*p);
    ...
Write a C Program to reverse a stack "in place" using recursion? 6 1 week

You can only use the following ADT functions on Stack:
IsEmpty
IsFull
Push
Pop
Top

...
Java Interview question 2 Rajiv 1 week

what is pure abstract class in Java? why we use interface if u have pure abstract class?

Forums

Main Theme Topics Posts
Miscellaneous -183 125
C/C++ Programming Questions 243 620
Object oriented queries 15 37
Perl specific Questions 2 3
Trees specific questions 33 81
Linked List specific questions 15 42
Algorithms 117 328
Multiple Choice Questions 9 15
GFacts -1 1
GPuzzles 20 61
Operating Systems 11 27
Interview Questions 1,344 2,806
Java specific Questions 9 17