Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise on Strings 1.)What would be the output of the following programs: (b) main() main char c[2] = A: printf(%c, c[0]); printf( %s. c): char

image text in transcribed
image text in transcribed
Exercise on Strings 1.)What would be the output of the following programs: (b) main() main char c[2] = "A": printf("%c", c[0]); printf(" %s". c): char [ ] = "Intro to programming with C!" ; printf(" %s", &s[2]); printf(" %s", s): printf(" %c", s[2]); Output: Output: main() char [] -"Weird syntax": int i = 0; while (so) != '\0') (d) int main(void) { char arri[10] = "testi"; char arr2[20] - "Testi"; if(strcmp(arri, arr2)ce) printf("arri smaller"); else if(strcmp(arri, arr2) printf("Same"); else printf("arri is larger"); ) printf(" %c%c", s[i], (s+i)); printf(" %c%c", ils),(i+s)): ++: return ; Output: Output: int main() { char s[] = "Da gaad feel gaad!" ; char x = '0'; char t[25); strcpy(t, s); int i=; while (s[i] != '\0' ) { if (t[i] == 'a') *(s+i)= x ; 1. void encrypt(char A[][20], int cypher, int size) { for(int i ; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions