Topic — Add New » Posts Last Poster Freshness
C Questions 2 dileepkumar 2 months

In which header file is the NULL macro defined?

Linux gcc compiler telling gets fucnction is dangerous to be used 3 arjunsarthi 2 months

I have wrote a program to reverse a string and accept a string using "gets " function and when i compiled ,it
showed a message like "gets function is dangerous and should not be used " .....can anyone explain why???
Thank you

VRP 1 xushi 2 months

Let's say given 9 cities. How should I permute them and split it into 3 vehicles, so that each vehicles take 3 cities?

C program for drawing with mouse 1 Sumanth 2 months

Sir,
I request you to send the code for the program "Drawing with Mouse using C" to my mail or you can post in this site .
With very High expectations,
waiting for your earliest reply......
Sumanth

predict output 4 kartik 2 months

void main(){
static char s[]="Hi Goodie";
int i=4;char ch;
ch=s[i++];printf("\t %c",ch);ch=++i[s];printf("\t %c",ch);
ch=++i[s];printf("\t %c",ch);ch=i++[s];printf("\t %c",ch);
ch=s[++i];printf("\t %c",ch);ch=i[s]++;printf("\t %c",ch);}

C program to replace all the letters of a string with all 26 alphabets..... 4 varul 2 months

C program to replace all the letters of a string with all 26 alphabets and to do permutations to all the substituted ones and finally store the resulted strings in a file..

please help me out in fixing this situation..
thanq

C++ Question 2 geek4u 2 months

I have problem in this program please HELP me

#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class myclass
{
	int x,y,z;
	public:
	myclass()
	{
		x=y=z=0;
		cout<<"Default constructor\n";
	}
	myclass(int a,int b,int c)
	{
		x=a;y=b;z=c;
		cout<<"Parameterized constructor\n";
	}
	~myclass()
	{
		cout<<"Default Destructor\n";
	}
	void *operator new(size_t s)
	{
		void *p;
		p=malloc(s);
		cout<<"Memory Allocated\n";
		return p;
	}
	...
divide and conquer 2 kartik 3 months

to find the no. of blank spaces ,semicolons,periods in a given string using divide and conquer?????

what is the output ?? and why 2 kartik 3 months

int a[1],b[1];
a[0]=1;
b[0]=2;
b[1]=4;
int *num1;
num1 = &b[0];
a[1]= static_cast<int>(*(num1));
cout<<a[0]<<endl<<a[1]<<endl<<b[0]<<endl<<b[1];

insert node in BST 4 kartik 3 months

A 'C' program to perform a insertion operation in a Binary Search Tree.

GE Healthcare interview question 1 mohan 3 months

Hi

If There are 20 processes running i need to print the top 5 processes which is occupying the maximum space.
What is the command to print this?

sequence point problem 3 rajeevpodar 3 months
#include<stdio.h>
main()
{
  abc((200,100),(300,400));
}

abc(int i)
{
  printf("%d\n",i);
}

output 200 how?????

associativity problem 4 tanmaybaid 3 months
#include<stdio.h>
int main()
{
  int a=10;
  int b;
  b = a++ + ++a;
   printf(" \n%d %d %d %d %d",b,a,a,a++,++a);
}

output:
22 14 14 13 14 why so??

pointer problems 2 kartik 3 months
main()
{
  char buf1[5];
  char buf2[5];
  gets(buf2); //input is given as mocksexam
  printf("%s\n",buf1);
  printf("%s\n",buf2);
}

output : exam
mocksexam
but how??????

unexpected output 2 kartik 3 months
#include <stdio.h>
main()
{int i=0100;
printf("%d",i);

}

The output is 64 ,why so???????

Print word in reverse order from a file 3 tarunjain07 3 months

[b]Write "India is my Country" to a file and print "aidnI si ym yrtnuoC" in C[/b]
Input : India is my Country
Output : aidnI si ym yrtnuoC

Precedence 5 avdd80 3 months

Please explain the associativity and order of execution in this statement
b= a + ++b + (a-b);
() has the highest precedence. but a-b is not executed first..
It is just executed from left to right