Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

C MAGICAL PROGRAM ME:-

Posted by Tushar Bedekar


void main()
{
int a;
a=300*300/300;
printf(“%d”,a);
}
What will be the output of the above Program

Few options which I can give are -

(1)300
(2)1
(3)81
(4)600
The Correct answer for this question is -

Option 3 i.e. 81

Confused???????

Check here



In C integer has range from -32768 to 32767.
Hence          32767 + 1 = -32768
Similarly       32767 + 3 = -32766

For the above question

300*300=90000

The value stored in integer variable ‘a’ is 24300

Now 24300/300 = 81 



Hence the answer is 81
Read More

Q. Write a C program to print the following V symbol star pyramid as:

Posted by Tushar Bedekar


                                                                        *     *
                                                                         *   *
                                                                          * *
                                                                            *

Soluation:-

/*c pyramid program for v-symbol*/
#include<stdio.h>
int main()
{

 int num=4,r,c,sp;
 for(r=1,c=num+1; r<=num; r++,c=c-2)
 {
   for(sp=r; sp>1; sp--)
      printf(" ");
   printf("*");
   for(sp=c; sp>=1; sp--)
      printf(" ");
   if(c>=1)
      printf("*");
   printf("\n");
 }
 getch();
 return 0;
}

Read More

FREE DOWNLOAD TURBO C-3 FOR WINDOWS XP AND WINDOWS 7

Posted by Tushar Bedekar


Turbo C + + is a C + + compiler with an integrated IDE that was developed by Borland, known because its speed in compilation and linking. This product is part of the family Borland compilers that is very popular  including Turbo Pascal, Turbo Basic, Turbo Prolog and Turbo C. Turbo C + + is a successor of Turbo C which is a further development with uniformity of procedure in the compiler as well as the manner contained in the Turbo Pascal 5.5 adding object functionality in Turbo Pascal versions previously. But unlike the Turbo Pascal, Turbo C + + always follow and maintain the standards that apply to C + + language.





Download links:-



Read More
back to top