Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]

[February 14, 2024, 02:00:39 PM]

[February 14, 2024, 02:00:39 PM]

[February 14, 2024, 02:00:39 PM]

[February 08, 2024, 10:26:18 AM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Career/ Jobs Zone » Placement Papers » Citicorp
 C Test - 1
Pages: [1]   Go Down
  Print  
Author Topic: C Test - 1  (Read 2792 times)
Tanya
TWI Addict
********



Karma: 1
Offline Offline

Posts: 4190


View Profile
C Test - 1
« Posted: June 07, 2007, 09:46:19 PM »


C Test - 1



1]. The following variable is available in file1.c
static int average_float;
all the functions in the file1.c can access the variable

[2]. extern int x;
Check the answer

[3]. Another Problem with
# define TRUE 0
some code
while(TRUE)
{
some code
}
This won't go into the loop as TRUE is defined as 0
[4]. A question in structures where the memebers are dd,mm,yy.
mm:dd:yy
09:07:97

[5]. Another structure question
1 Rajiv System Analyst

[6]. INFILE.DAT is copied to OUTFILE.DAT

[7]. A question with argc and argv .
Input will be


main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %dn",x,y);
}

int x;
main()
{
int x=0;
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %dn",x);
}
x++;
change_value(x);
printf("Second Output : %dn",x);
Modify_value();
printf("Third Output : %dn",x);
}

Modify_value()
{
return (x+=10);
}

change_value()
{
return(x+=1);
}



main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %dn",x,y);
}



main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%sn",p2);
}


main()
{
int x=5;
printf("%d %d %dn",x,x<<2,x>>2);
}



#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %dn",x,y);
swap2(x,y);
printf("%d %dn",x,y);
}

int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}



main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%sn",ptr);
ptr++;
printf("%sn",ptr);
}



#include<stdio.h>
main()
{
char s1="Ramco";
char s2="Systems";
s1=s2;
printf("%s",s1);
}



#include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.091 seconds with 25 queries.