This is my solution, but the Output is as follows:-
Contains Duplicate Number:7 Count 2
Contains Duplicate Number:7 Count 3Is there a way i can get only 1 Output like this :-
Contains...
Type: Posts; User: nevx
This is my solution, but the Output is as follows:-
Contains Duplicate Number:7 Count 2
Contains Duplicate Number:7 Count 3Is there a way i can get only 1 Output like this :-
Contains...
can you give an example of the exceptions you mention ? If possible?
can someone please explain why when we use scanf to get array input we don't have to put the & sign in front of the Var name of the array
e.g
char name[20];
int id;
printf("Enter stuid,...
thanks , reading up on malloc() and realloc()
For E.g i declare an array t[5]; and later in the program i want increase the array size can i declare the same array let say t[10]; again ,
without creating a new array with a larger size and copy...
I find it really helpful to learn c++ before i jump into c# or Java , The oops concepts become so clear to me , what do you think guys is this a good idea or a waste of time ?
on my way to learning C , awesome John.c , you help me so much!
thanks , that's way better now , I understand perfectly now
n =m+n;
int new[n];
printf("\nThe New array Size %d :",n);
for(i=0;i<n;i++)
{
new[i] =a[i];
printf("\n%d",new[i]);
So what do i do now ?
can you elaborate with the code plz
what you mean by: just by assigning values out of bounds ?
i don't get it , but what i'm doing is shifting the values by n number then inserting the second array in the space , so what is the issue here ?
//shifting
for(i=m-1;i>=loc;i--)
{
...
This is my sample code , however i seem to get an odd answer , can someone explain why i get my ans as :
This is the Terminal output , LOOK BELOW FOR THE CODE
Enter Element: 1 1
...
This Seems to Work
int fact(int num)
{
int i=1;
int fact =1;
if(num == 0) {
num =1;
Can anyone please help me with my logic here , i can't seem to figure it out, however when i try to find Factorial of num 2 i get the factorial as 2 which is right , but other numbers give me huge...