Welcome to %1$s. Please log in.

 
: Welcome to the TechnoWorldInc! Community!
Techno World Inc - The Best Technical Encyclopedia Online! | Forum | THE TECHNO CLUB [ TECHNOWORLDINC.COM ] | Career/ Jobs Zone | Placement Papers | Citicorp | C Test - 1

Tanya

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);
}

Recent Updates

[August 11, 2025, 08:33:44 AM]

[August 11, 2025, 08:33:44 AM]

[August 11, 2025, 08:33:44 AM]

[August 11, 2025, 08:33:44 AM]

[May 13, 2025, 08:34:25 AM]

[May 13, 2025, 08:34:25 AM]

[May 13, 2025, 08:34:25 AM]

[April 12, 2025, 08:24:20 AM]

[April 12, 2025, 08:24:20 AM]

[April 12, 2025, 08:24:20 AM]

[April 12, 2025, 08:24:20 AM]

[March 12, 2025, 09:35:30 AM]

[March 12, 2025, 09:35:30 AM]

Subscriptions

<style>@import url('https://fonts.googleapis.com/css?family=Montserrat:700');@import url('https://fonts.googleapis.com/css?family=Montserrat:400'); .form-preview { display: flex; flex-direction: column; justify-content: center; margin-top: 30px; padding: clamp(17px, 5%, 40px) clamp(17px, 7%, 50px); max-width: none; border-radius: 6px; box-shadow: 0 5px 25px rgba(34, 60, 47, 0.25); } .form-preview, .form-preview *{ box-sizing: border-box; } .form-preview .preview-heading { width: 100%; } .form-preview .preview-heading h5{ margin-top: 0; margin-bottom: 0; } .form-preview .preview-input-field { margin-top: 20px; width: 100%; } .form-preview .preview-input-field input { width: 100%; height: 40px; border-radius: 6px; border: 2px solid #e9e8e8; background-color: #fff; outline: none; } .form-preview .preview-input-field input { color: #000000; font-family: "Montserrat"; font-size: 14px; font-weight: 400; line-height: 20px; text-align: center; } .form-preview .preview-input-field input::placeholder { color: #000000; opacity: 1; } .form-preview .preview-input-field input:-ms-input-placeholder { color: #000000; } .form-preview .preview-input-field input::-ms-input-placeholder { color: #000000; } .form-preview .preview-submit-button { margin-top: 10px; width: 100%; } .form-preview .preview-submit-button button { width: 100%; height: 40px; border: 0; border-radius: 6px; line-height: 0px; } .form-preview .preview-submit-button button:hover { cursor: pointer; } </style><form data-v-3a89cb67="" action="https://api.follow.it/subscription-form/QUJrWmZTYXZTNTJ5UDdYb2NaeVlQMmdRWTNQenUrdHdueldtWTNVOGk4WVJhVm94L280bzRPbFE1bVcwNDZ1UWJ4T0VFb0FETWJ4QjhhNGo3ekhGVXNRVmhkbXNnUDlZVkh6RWdmWWlveVVvWDZwbVNCcmpGZUVjMTBNN09WREN8dW1lOTY5VVhCNUtYZTJRdGRZV3ZSQWpaWVVpdGtqbjdNTC9HT2RlMndiaz0=/8" method="post"><div data-v-3a89cb67="" class="form-preview" style="background-color: rgb(255, 255, 255); border-style: solid; border-width: 1px; border-color: rgb(204, 204, 204); position: relative;"><div data-v-3a89cb67="" class="preview-heading"><h5 data-v-3a89cb67="" style="text-transform: none !important; font-family: Montserrat; font-weight: bold; color: rgb(0, 0, 0); font-size: 16px; text-align: center;">Get Latest Tech Updates For Free!</h5></div> <div data-v-3a89cb67="" class="preview-input-field"><input data-v-3a89cb67="" type="email" name="email" required="required" placeholder="Enter email" spellcheck="false" style="text-transform: none !important; font-family: Montserrat; font-weight: normal; color: rgb(0, 0, 0); font-size: 14px; text-align: center; background-color: rgb(255, 255, 255);"></div> <div data-v-3a89cb67="" class="preview-submit-button"><button data-v-3a89cb67="" type="submit" style="text-transform: none !important; font-family: Montserrat; font-weight: bold; color: rgb(255, 255, 255); font-size: 16px; text-align: center; background-color: rgb(96, 131, 190);">Subscribe</button></div></div></form>

Resources

   

C Test - 1

Started by Tanya, June 07, 2007, 04:16:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

  Print     Print       Print