Saturday, 28 February 2009
c programs in linux
(1)What will be output if you will execute following program by gcc compiler in Linux?#includeint main(){ int a=5; printf("%d %d %d",a++,a++,++a); return 0;}Output:In LINUX7 6 8In TURBO C7 6 6Hints: In Turbo c parameter is passed from right to left in printf function but not in the Linux.(2)What will be output if you will execute following program by gcc compiler in Linux?#
C Program to calcuate interest and total amount at the end of each year
Write a
Note: Output is not in the form of table and rate is taken as 2%. It calculates amount of each year
#include <stdio.h>
#include <conio.h>
void main()
{
int t=1;
int r=2;
int y;
int y1=0;
long int p,a;
float i1;
double total;;
clrscr();
printf("enter starting amount&year");
scanf("%ld""%d",&p,&y);
while(y1<2009) i1="(p*r*t)/100;" total="i1+a+p;" p="p+a;" style="color: rgb(255, 0, 0);">
Posted and supported by
(Ankita Shukla, U.P)
c program
calculate interest and total amount at da end of each yearNote: Output is not in the form of table and rate is taken as 2%. It calculates amount of each year
#include <stdio.h>
#include <conio.h>
void main()
{
int t=1;
int r=2;
int y;
int y1=0;
long int p,a;
float i1;
double total;;
clrscr();
printf("enter starting amount&year");
scanf("%ld""%d",&p,&y);
while(y1<2009) i1="(p*r*t)/100;" total="i1+a+p;" p="p+a;" style="color: rgb(255, 0, 0);">
Posted and supported by
(Ankita Shukla, U.P)
Friday, 30 January 2009
c language questions
(5)Find the correct output void main() { char a[4]=”rama”; char b[]=”shyama”; printf(“%d %d”, sizeof(a),sizeof( b)) ; } (a) 4 7 (b) 5 6 (c) 5 7 (d) 4 6 (6)Find the correct output void main() { int a[]={‘a’,’b’,’c’}; printf(“%d”, sizeof(a)); } (a)3 (b)4 (c)can’t be initialized (d)None of these (7)
c language
(10)Identify the true statement (a)Memory allocated by an array can be deallocated using free() function (b)C also supports zero length array (c)Array can be used to hold dissimilar kinds of data (d)Working beyond array size is risky (11)Which is true about array? (a)Array can be dynamic (b)Using malloc memory can be allocated for array during run time (c)
Sunday, 25 January 2009
Sql questions and answer with solution
commonly asked question in sql with solution for p...
good questions of sql with solutions
questions on natural,inner & outer joins in sql wi...
BE MASTER IN SQL IN THREE HOUR
DATA DEFINATION LANGUAGE IN SQL
NAMING CONVENTIONS IN SQL
CONSTRAINTS IN SQL
DATA TYPES IN SQL
DEFINING A CONSTRAINT IN SQL
FOREIGN KEY CONSTARINT IN SQL
NOT NULL CONSTRAINT IN SQL
UNIQUE KEY Constraint IN SQL
good questions of sql with solutions
questions on natural,inner & outer joins in sql wi...
BE MASTER IN SQL IN THREE HOUR
DATA DEFINATION LANGUAGE IN SQL
NAMING CONVENTIONS IN SQL
CONSTRAINTS IN SQL
DATA TYPES IN SQL
DEFINING A CONSTRAINT IN SQL
FOREIGN KEY CONSTARINT IN SQL
NOT NULL CONSTRAINT IN SQL
UNIQUE KEY Constraint IN SQL
Friday, 23 January 2009
C coding questions
(1)What will be output when you compile and execute the following code? void main() { int i,j; clrscr(); for(i=0;i<5;i++) { for(j=0;j<5;j++) { printf("*"); } printf("\n"); } getch(); }For output click me (2)What will be output when you compile and execute the following code? void main() { int i,j;
Subscribe to:
Posts (Atom)